mirror of
https://github.com/GSA/notifications-api.git
synced 2026-08-16 20:48:37 -04:00
Adding service_id to the sort order for the letters being sent to print.
We have had a few instances where letters have caused problems. Particularly for precompiled letters, often the issue comes from the same service. The hope is that by adding a sort order this will help the print provider narrow down the problem. There is a small degradation of the performance of the query, but it's not enough to concern me.
This commit is contained in:
@@ -728,6 +728,7 @@ def dao_get_letters_to_be_printed(print_run_deadline, postage):
|
||||
Notification.key_type == KEY_TYPE_NORMAL,
|
||||
Notification.postage == postage,
|
||||
).order_by(
|
||||
Notification.service_id,
|
||||
Notification.created_at
|
||||
).all()
|
||||
return notifications
|
||||
|
||||
Reference in New Issue
Block a user