Update app to utilize updated phone validation methods

This commit is contained in:
Ryan Ahearn
2023-01-04 16:35:18 -05:00
parent 767e10b52e
commit abc7b09d0d
8 changed files with 211 additions and 209 deletions

View File

@@ -151,10 +151,7 @@ def check_if_service_can_send_to_number(service, number):
else:
permissions = service.permissions
if (
# if number is international and not a crown dependency
international_phone_info.international and not international_phone_info.crown_dependency
) and INTERNATIONAL_SMS_TYPE not in permissions:
if international_phone_info.international and INTERNATIONAL_SMS_TYPE not in permissions:
raise BadRequestError(message="Cannot send to international mobile numbers")
else:
return international_phone_info