mirror of
https://github.com/GSA/notifications-api.git
synced 2026-01-30 14:31:57 -05:00
Temporarily do not send letters from Insolvency Service
to DVLA. This is a temporary measure over the weekend so that DVLA can catch up with all other letters. We should revert this on Monday 19.10.2020
This commit is contained in:
@@ -721,12 +721,16 @@ 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.filter(
|
||||
notifications = Notification.query.join(
|
||||
Service,
|
||||
Notification.service_id == Service.id
|
||||
).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)),
|
||||
).order_by(
|
||||
Notification.service_id,
|
||||
Notification.created_at
|
||||
|
||||
Reference in New Issue
Block a user