Add notification_type to notification table.

It seems like an oversight not to include the notification type in the notifcation.
When updating statistics a query to the template table is required to get the type, this update will mean that query does not have to happen.
This commit is contained in:
Rebecca Law
2016-06-29 11:23:02 +01:00
parent 340abae82c
commit 60e159e3c0
6 changed files with 35 additions and 3 deletions

View File

@@ -976,6 +976,7 @@ def _notification_json(sample_template, job_id=None, id=None, status=None):
'template_version': sample_template.version,
'created_at': datetime.utcnow(),
'content_char_count': 160,
'notification_type': sample_template.template_type
}
if job_id:
data.update({'job_id': job_id})