Display cancelled letters show as failed

In the long term, we don't want to show cancelled letters. But for now,
this changes cancelled letters to display in the same way that letters
with a status of permanent-failure, since we are currently giving
letters that we want to cancel the status of permanent failure.
This commit is contained in:
Katie Smith
2018-12-04 15:07:20 +00:00
parent 1ee972bd04
commit 429a23934d
8 changed files with 19 additions and 8 deletions

View File

@@ -373,6 +373,7 @@ def format_notification_status(status, template_type):
'pending-virus-check': 'Pending virus check',
'virus-scan-failed': 'Virus detected',
'returned-letter': 'Delivered',
'cancelled': 'Cancelled,'
}
}[template_type].get(status, status)
@@ -398,6 +399,7 @@ def format_notification_status_as_field_status(status, notification_type):
'pending-virus-check': None,
'virus-scan-failed': 'error',
'returned-letter': None,
'cancelled': 'error',
}
}.get(
notification_type,