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:
Pea Tyczynska
2020-10-16 16:13:32 +01:00
parent 8b123fd6a4
commit 30bd311eb1
3 changed files with 36 additions and 2 deletions

View File

@@ -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