mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-07-14 02:09:44 -04:00
Merge pull request #2303 from alphagov/pending-status
Map ‘pending’ status to ‘sending’
This commit is contained in:
@@ -372,6 +372,7 @@ def format_notification_status(status, template_type):
|
||||
'delivered': 'Delivered',
|
||||
'sending': 'Sending',
|
||||
'created': 'Sending',
|
||||
'pending': 'Sending',
|
||||
'sent': 'Sent internationally'
|
||||
},
|
||||
'letter': {
|
||||
@@ -391,10 +392,9 @@ def format_notification_status(status, template_type):
|
||||
|
||||
|
||||
def format_notification_status_as_time(status, created, updated):
|
||||
return {
|
||||
'sending': ' since {}'.format(created),
|
||||
'created': ' since {}'.format(created)
|
||||
}.get(status, updated)
|
||||
return dict.fromkeys(
|
||||
{'created', 'pending', 'sending'}, ' since {}'.format(created)
|
||||
).get(status, updated)
|
||||
|
||||
|
||||
def format_notification_status_as_field_status(status, notification_type):
|
||||
@@ -423,7 +423,8 @@ def format_notification_status_as_field_status(status, notification_type):
|
||||
'delivered': None,
|
||||
'sent': None,
|
||||
'sending': 'default',
|
||||
'created': 'default'
|
||||
'created': 'default',
|
||||
'pending': 'default',
|
||||
}
|
||||
).get(status, 'error')
|
||||
|
||||
|
||||
Reference in New Issue
Block a user