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:
Adam Shimali
2016-02-09 12:48:27 +00:00
parent d24a356205
commit e5e049d735
4 changed files with 15 additions and 14 deletions

View File

@@ -202,9 +202,9 @@ def sample_notification(notify_db,
data = {
'id': notificaton_id,
'to': to,
'job_id': job.id,
'service_id': service.id,
'template_id': template.id
'job': job,
'service': service,
'template': template
}
notification = Notification(**data)
save_notification(notification)