Revert "Merge pull request #2887 from alphagov/cache-the-serialised-things"

This reverts commit b8c2c6b291, reversing
changes made to 351aca2c5a.
This commit is contained in:
Chris Hill-Scott
2020-06-26 13:42:44 +01:00
parent b8fe7b8e61
commit 7e85e37e1d
15 changed files with 50 additions and 215 deletions

View File

@@ -90,7 +90,7 @@ def service_can_send_to_recipient(send_to, key_type, service, allow_whitelisted_
def service_has_permission(notify_type, permissions):
return notify_type in permissions
return notify_type in [p.permission for p in permissions]
def check_service_has_permission(notify_type, permissions):
@@ -131,7 +131,7 @@ def check_if_service_can_send_to_number(service, number):
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 service.permissions:
) and INTERNATIONAL_SMS_TYPE not in [p.permission for p in service.permissions]:
raise BadRequestError(message="Cannot send to international mobile numbers")
else:
return international_phone_info