Fix test notifications

This commit is contained in:
Shane McDonald
2021-02-08 17:38:58 -05:00
parent fc6acbd9d1
commit 0e2fb02185

View File

@@ -336,7 +336,8 @@ def send_notifications(notification_list, job_id=None):
sent = notification.notification_template.send(notification.subject, notification.body) sent = notification.notification_template.send(notification.subject, notification.body)
notification.status = "successful" notification.status = "successful"
notification.notifications_sent = sent notification.notifications_sent = sent
job_actual.log_lifecycle("notifications_sent") if job_id is not None:
job_actual.log_lifecycle("notifications_sent")
except Exception as e: except Exception as e:
logger.exception("Send Notification Failed {}".format(e)) logger.exception("Send Notification Failed {}".format(e))
notification.status = "failed" notification.status = "failed"