mirror of
https://github.com/GSA/notifications-api.git
synced 2026-01-30 06:21:50 -05:00
Change DAO to return the notification from an update, not Boolean
- tests reflect this
This commit is contained in:
@@ -139,7 +139,7 @@ def _update_notification_status(notification, status):
|
||||
status = _decide_permanent_temporary_failure(current_status=notification.status, status=status)
|
||||
notification.status = status
|
||||
dao_update_notification(notification)
|
||||
return True
|
||||
return notification
|
||||
|
||||
|
||||
@statsd(namespace="dao")
|
||||
@@ -152,7 +152,7 @@ def update_notification_status_by_id(notification_id, status):
|
||||
Notification.status == 'pending')).first()
|
||||
|
||||
if not notification:
|
||||
return False
|
||||
return None
|
||||
|
||||
return _update_notification_status(
|
||||
notification=notification,
|
||||
@@ -169,7 +169,7 @@ def update_notification_status_by_reference(reference, status):
|
||||
Notification.status == 'pending')).first()
|
||||
|
||||
if not notification:
|
||||
return False
|
||||
return None
|
||||
|
||||
return _update_notification_status(
|
||||
notification=notification,
|
||||
|
||||
Reference in New Issue
Block a user