mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-09-09 00:43:11 -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',
|
'delivered': 'Delivered',
|
||||||
'sending': 'Sending',
|
'sending': 'Sending',
|
||||||
'created': 'Sending',
|
'created': 'Sending',
|
||||||
|
'pending': 'Sending',
|
||||||
'sent': 'Sent internationally'
|
'sent': 'Sent internationally'
|
||||||
},
|
},
|
||||||
'letter': {
|
'letter': {
|
||||||
@@ -391,10 +392,9 @@ def format_notification_status(status, template_type):
|
|||||||
|
|
||||||
|
|
||||||
def format_notification_status_as_time(status, created, updated):
|
def format_notification_status_as_time(status, created, updated):
|
||||||
return {
|
return dict.fromkeys(
|
||||||
'sending': ' since {}'.format(created),
|
{'created', 'pending', 'sending'}, ' since {}'.format(created)
|
||||||
'created': ' since {}'.format(created)
|
).get(status, updated)
|
||||||
}.get(status, updated)
|
|
||||||
|
|
||||||
|
|
||||||
def format_notification_status_as_field_status(status, notification_type):
|
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,
|
'delivered': None,
|
||||||
'sent': None,
|
'sent': None,
|
||||||
'sending': 'default',
|
'sending': 'default',
|
||||||
'created': 'default'
|
'created': 'default',
|
||||||
|
'pending': 'default',
|
||||||
}
|
}
|
||||||
).get(status, 'error')
|
).get(status, 'error')
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user