mirror of
https://github.com/GSA/notifications-api.git
synced 2026-02-27 05:20:01 -05:00
Remove redundant filters in timeout update query
These aren't necessary since we're locking the set of notifications to update, which are queried using the same filters.
This commit is contained in:
@@ -474,9 +474,6 @@ def _timeout_notifications(current_statuses, new_status, timeout_start, updated_
|
||||
).all()
|
||||
|
||||
Notification.query.filter(
|
||||
Notification.created_at < timeout_start,
|
||||
Notification.status.in_(current_statuses),
|
||||
Notification.notification_type.in_([SMS_TYPE, EMAIL_TYPE]),
|
||||
Notification.id.in_([n.id for n in notifications]),
|
||||
).update(
|
||||
{'status': new_status, 'updated_at': updated_at},
|
||||
|
||||
Reference in New Issue
Block a user