Update Notification history if there is a mismatch in the number of notifications to be updated and the number actually updated.

This commit is contained in:
Rebecca Law
2019-05-15 15:30:15 +01:00
parent 82d8c7014d
commit 198fd21f7e
2 changed files with 20 additions and 1 deletions

View File

@@ -526,7 +526,7 @@ def dao_update_notifications_by_reference(references, update_dict):
)
updated_history_count = 0
if updated_count == 0:
if updated_count != len(references):
updated_history_count = NotificationHistory.query.filter(
NotificationHistory.reference.in_(references)
).update(