Merge pull request #1613 from alphagov/international-500

fix 500 when receiving delivery receipt from some international nums
This commit is contained in:
Leo Hemsted
2018-01-30 13:58:39 +00:00
committed by GitHub
2 changed files with 16 additions and 1 deletions

View File

@@ -134,7 +134,8 @@ def _decide_permanent_temporary_failure(current_status, status):
def country_records_delivery(phone_prefix):
return INTERNATIONAL_BILLING_RATES[phone_prefix]['attributes']['dlr'].lower() == 'yes'
dlr = INTERNATIONAL_BILLING_RATES[phone_prefix]['attributes']['dlr']
return dlr and dlr.lower() == 'yes'
def _update_notification_status(notification, status):