Add created as a status for notifications

This commit is contained in:
Rebecca Law
2016-06-21 13:41:46 +01:00
parent 4cb67e8767
commit 8caa688bf5
2 changed files with 51 additions and 2 deletions

View File

@@ -311,7 +311,7 @@ class VerifyCode(db.Model):
return check_hash(cde, self._code)
NOTIFICATION_STATUS_TYPES = ['sending', 'delivered', 'pending', 'failed',
NOTIFICATION_STATUS_TYPES = ['created', 'sending', 'delivered', 'pending', 'failed',
'technical-failure', 'temporary-failure', 'permanent-failure']
@@ -348,7 +348,7 @@ class Notification(db.Model):
nullable=True,
onupdate=datetime.datetime.utcnow)
status = db.Column(
db.Enum(*NOTIFICATION_STATUS_TYPES, name='notify_status_types'), nullable=False, default='sending')
db.Enum(*NOTIFICATION_STATUS_TYPES, name='notify_status_type'), nullable=False, default='sending')
reference = db.Column(db.String, nullable=True, index=True)
_personalisation = db.Column(db.String, nullable=True)