mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-09-09 06:53:11 -04:00
simplify formatter
This commit is contained in:
@@ -238,9 +238,7 @@ def format_notification_status_as_time(status, created, updated):
|
|||||||
|
|
||||||
|
|
||||||
def format_notification_status_as_field_status(status, notification_type):
|
def format_notification_status_as_field_status(status, notification_type):
|
||||||
return {}.get(
|
return {
|
||||||
notification_type,
|
|
||||||
{
|
|
||||||
'failed': 'error',
|
'failed': 'error',
|
||||||
'technical-failure': 'error',
|
'technical-failure': 'error',
|
||||||
'temporary-failure': 'error',
|
'temporary-failure': 'error',
|
||||||
@@ -250,8 +248,7 @@ def format_notification_status_as_field_status(status, notification_type):
|
|||||||
'sending': 'default',
|
'sending': 'default',
|
||||||
'created': 'default',
|
'created': 'default',
|
||||||
'pending': 'default',
|
'pending': 'default',
|
||||||
}
|
}.get(status, 'error')
|
||||||
).get(status, 'error')
|
|
||||||
|
|
||||||
|
|
||||||
def format_notification_status_as_url(status, notification_type):
|
def format_notification_status_as_url(status, notification_type):
|
||||||
|
|||||||
Reference in New Issue
Block a user