mirror of
https://github.com/GSA/notifications-api.git
synced 2025-12-17 10:42:25 -05:00
Revert "Merge pull request #2887 from alphagov/cache-the-serialised-things"
This reverts commitb8c2c6b291, reversing changes made to351aca2c5a.
This commit is contained in:
@@ -7,8 +7,6 @@ from app.models import (
|
||||
MOBILE_TYPE, EMAIL_TYPE,
|
||||
KEY_TYPE_TEST, KEY_TYPE_TEAM, KEY_TYPE_NORMAL)
|
||||
|
||||
from app.dao.services_dao import dao_fetch_service_by_id
|
||||
|
||||
|
||||
def get_recipients_from_request(request_json, key, type):
|
||||
return [(type, recipient) for recipient in request_json.get(key)]
|
||||
@@ -35,10 +33,6 @@ def service_allowed_to_send_to(recipient, service, key_type, allow_whitelisted_r
|
||||
if key_type == KEY_TYPE_NORMAL and not service.restricted:
|
||||
return True
|
||||
|
||||
# Revert back to the ORM model here so we can get some things which
|
||||
# aren’t in the serialised model
|
||||
service = dao_fetch_service_by_id(service.id)
|
||||
|
||||
team_members = itertools.chain.from_iterable(
|
||||
[user.mobile_number, user.email_address] for user in service.users
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user