mirror of
https://github.com/GSA/notifications-api.git
synced 2025-12-20 23:41:17 -05:00
Start sending letters from insolvency service again
This commit is contained in:
@@ -721,16 +721,12 @@ def dao_get_letters_to_be_printed(print_run_deadline, postage):
|
||||
"""
|
||||
Return all letters created before the print run deadline that have not yet been sent
|
||||
"""
|
||||
notifications = Notification.query.join(
|
||||
Service,
|
||||
Notification.service_id == Service.id
|
||||
).filter(
|
||||
notifications = Notification.query.filter(
|
||||
Notification.created_at < convert_bst_to_utc(print_run_deadline),
|
||||
Notification.notification_type == LETTER_TYPE,
|
||||
Notification.status == NOTIFICATION_CREATED,
|
||||
Notification.key_type == KEY_TYPE_NORMAL,
|
||||
Notification.postage == postage,
|
||||
or_(Service.organisation_id != 'f33fdfdd-7533-40cb-b5e8-cd78a1f5d21e', Service.organisation_id.is_(None)),
|
||||
Notification.postage == postage
|
||||
).order_by(
|
||||
Notification.service_id,
|
||||
Notification.created_at
|
||||
|
||||
Reference in New Issue
Block a user