mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-08-20 14:29:51 -04:00
Only link to message status if message has failed
This retores the behaviour to as it was before https://github.com/alphagov/notifications-admin/pull/2962 which inadvertently started linking to the guidance for messages that were delivered or in sending.
This commit is contained in:
@@ -442,9 +442,14 @@ def format_notification_status_as_field_status(status, notification_type):
|
||||
).get(status, 'error')
|
||||
|
||||
|
||||
def format_notification_status_as_url(notification_type):
|
||||
def format_notification_status_as_url(status, notification_type):
|
||||
url = partial(url_for, "main.message_status")
|
||||
|
||||
if status not in {
|
||||
'technical-failure', 'temporary-failure', 'permanent-failure',
|
||||
}:
|
||||
return None
|
||||
|
||||
return {
|
||||
'email': url(_anchor='email-statuses'),
|
||||
'sms': url(_anchor='sms-statuses')
|
||||
|
||||
Reference in New Issue
Block a user