mirror of
https://github.com/GSA/notifications-api.git
synced 2025-12-20 23:41:17 -05:00
Added service and template relationship to notification model.
This makes it more consistent with other model classes with respect to marhmallow serialisation/deserialisation.
This commit is contained in:
@@ -6,8 +6,8 @@ def save_notification(notification, update_dict={}):
|
||||
if update_dict:
|
||||
update_dict.pop('id', None)
|
||||
update_dict.pop('job', None)
|
||||
update_dict.pop('service_id', None)
|
||||
update_dict.pop('template_id', None)
|
||||
update_dict.pop('service', None)
|
||||
update_dict.pop('template', None)
|
||||
Notification.query.filter_by(id=notification.id).update(update_dict)
|
||||
else:
|
||||
db.session.add(notification)
|
||||
|
||||
Reference in New Issue
Block a user