Change notification status of failed letters

- Changed the notification status of letters for letters that DVLA marks
as 'failed' from NOTIFICATION_TECHNICAL_FAILURE to
NOTIFICATION_TEMPORARY_FAILURE.
This commit is contained in:
Katie Smith
2018-01-15 14:22:09 +00:00
parent 6a3c2734ca
commit f1c75c5c5d
2 changed files with 4 additions and 2 deletions

View File

@@ -63,6 +63,7 @@ from app.models import (
LETTER_TYPE,
NOTIFICATION_DELIVERED,
NOTIFICATION_SENDING,
NOTIFICATION_TEMPORARY_FAILURE,
NOTIFICATION_TECHNICAL_FAILURE,
SMS_TYPE,
)
@@ -476,7 +477,7 @@ def update_letter_notifications_statuses(self, filename):
else:
for update in notification_updates:
status = NOTIFICATION_DELIVERED if update.status == DVLA_RESPONSE_STATUS_SENT \
else NOTIFICATION_TECHNICAL_FAILURE
else NOTIFICATION_TEMPORARY_FAILURE
updated_count = dao_update_notifications_by_reference(
references=[update.reference],
update_dict={"status": status,