Handle case where provider does not have international flag

This commit is contained in:
Imdad Ahad
2017-04-25 16:26:33 +01:00
parent 1788f10959
commit 116eac60d1
3 changed files with 14 additions and 3 deletions

View File

@@ -20,7 +20,7 @@ def view_providers():
for provider in providers:
if provider['notification_type'] == 'sms':
domestic_sms_providers.append(provider)
if provider['supports_international']:
if provider.get('supports_international', None):
intl_sms_providers.append(provider)
elif provider['notification_type'] == 'email':
domestic_email_providers.append(provider)