Add pending flag to scheduled_notifications.

Set pending flag to false when the notification has been sent to provider task.
This commit is contained in:
Rebecca Law
2017-05-22 15:07:16 +01:00
parent a57dc18895
commit 9bfba52f53
7 changed files with 38 additions and 4 deletions

View File

@@ -495,6 +495,8 @@ def sample_notification(
notification_id=notification.id,
scheduled_for=datetime.strptime(scheduled_for,
"%Y-%m-%d %H"))
if status != 'created':
scheduled_notification.pending = False
db.session.add(scheduled_notification)
db.session.commit()