mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-08-24 16:24:08 -04:00
Handle case where provider does not have international flag
This commit is contained in:
@@ -20,7 +20,7 @@ def view_providers():
|
|||||||
for provider in providers:
|
for provider in providers:
|
||||||
if provider['notification_type'] == 'sms':
|
if provider['notification_type'] == 'sms':
|
||||||
domestic_sms_providers.append(provider)
|
domestic_sms_providers.append(provider)
|
||||||
if provider['supports_international']:
|
if provider.get('supports_international', None):
|
||||||
intl_sms_providers.append(provider)
|
intl_sms_providers.append(provider)
|
||||||
elif provider['notification_type'] == 'email':
|
elif provider['notification_type'] == 'email':
|
||||||
domestic_email_providers.append(provider)
|
domestic_email_providers.append(provider)
|
||||||
|
|||||||
@@ -18,7 +18,7 @@ Providers
|
|||||||
domestic_sms_providers,
|
domestic_sms_providers,
|
||||||
caption="Domestic SMS providers",
|
caption="Domestic SMS providers",
|
||||||
caption_visible=False,
|
caption_visible=False,
|
||||||
empty_message='No email providers',
|
empty_message='No domestic sms providers',
|
||||||
field_headings=['Provider', 'Priority', 'Active', 'Last Updated', 'Updated By'],
|
field_headings=['Provider', 'Priority', 'Active', 'Last Updated', 'Updated By'],
|
||||||
field_headings_visible=True
|
field_headings_visible=True
|
||||||
) %}
|
) %}
|
||||||
@@ -84,7 +84,7 @@ Providers
|
|||||||
intl_sms_providers,
|
intl_sms_providers,
|
||||||
caption="International SMS providers",
|
caption="International SMS providers",
|
||||||
caption_visible=False,
|
caption_visible=False,
|
||||||
empty_message='No email providers',
|
empty_message='No international sms providers',
|
||||||
field_headings=['Provider', 'Priority', 'Active', 'Last Updated', 'Updated By'],
|
field_headings=['Provider', 'Priority', 'Active', 'Last Updated', 'Updated By'],
|
||||||
field_headings_visible=True
|
field_headings_visible=True
|
||||||
) %}
|
) %}
|
||||||
|
|||||||
@@ -73,6 +73,17 @@ stub_providers = {
|
|||||||
'created_by': None,
|
'created_by': None,
|
||||||
'supports_international': True
|
'supports_international': True
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
'id': '67c770f5-918e-4afa-a5ff-880b9beb161d',
|
||||||
|
'active': False,
|
||||||
|
'priority': 10,
|
||||||
|
'display_name': 'International SMS Provider (no flag)',
|
||||||
|
'identifier': 'second_sms_international',
|
||||||
|
'notification_type': 'sms',
|
||||||
|
'updated_at': None,
|
||||||
|
'version': 1,
|
||||||
|
'created_by': None,
|
||||||
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user