mirror of
https://github.com/GSA/notifications-api.git
synced 2025-12-20 15:31:15 -05:00
Add updated history count to dao_update_notifications_by_reference
For returned letter updates most notifications won't exist in the notifications table, so in order to find out whether the reference matches any known letters we need to check the count of updated history records.
This commit is contained in:
@@ -465,14 +465,14 @@ def dao_update_notifications_by_reference(references, update_dict):
|
||||
synchronize_session=False
|
||||
)
|
||||
|
||||
NotificationHistory.query.filter(
|
||||
updated_history_count = NotificationHistory.query.filter(
|
||||
NotificationHistory.reference.in_(references)
|
||||
).update(
|
||||
update_dict,
|
||||
synchronize_session=False
|
||||
)
|
||||
|
||||
return updated_count
|
||||
return updated_count, updated_history_count
|
||||
|
||||
|
||||
@statsd(namespace="dao")
|
||||
|
||||
Reference in New Issue
Block a user