mirror of
https://github.com/GSA/notifications-api.git
synced 2026-02-03 18:01:08 -05:00
make notification.key_type not nullable
set to 'normal' for all existing notifications, and all job notifications also created as 'normal' - so if your eg reporting service hits notify, it gets notifications created from both API calls and front-end csv jobs.
This commit is contained in:
@@ -14,7 +14,8 @@ from app.models import (
|
||||
Job,
|
||||
NotificationStatistics,
|
||||
TemplateStatistics,
|
||||
NOTIFICATION_STATUS_TYPES
|
||||
NOTIFICATION_STATUS_TYPES,
|
||||
KEY_TYPE_NORMAL
|
||||
)
|
||||
|
||||
from app.dao.notifications_dao import (
|
||||
@@ -976,7 +977,8 @@ 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
|
||||
'notification_type': sample_template.template_type,
|
||||
'key_type': KEY_TYPE_NORMAL
|
||||
}
|
||||
if job_id:
|
||||
data.update({'job_id': job_id})
|
||||
|
||||
Reference in New Issue
Block a user