Rename function in service utils

To reflect the new name of the feature.

squash! Rename function in service utils

Rename function, variable and argument names in service utils
This commit is contained in:
Chris Hill-Scott
2020-07-28 10:19:46 +01:00
parent 6384b9ef4f
commit 4d896aa642
5 changed files with 14 additions and 14 deletions

View File

@@ -78,8 +78,8 @@ def check_template_is_active(template):
message="Template has been deleted")
def service_can_send_to_recipient(send_to, key_type, service, allow_whitelisted_recipients=True):
if not service_allowed_to_send_to(send_to, service, key_type, allow_whitelisted_recipients):
def service_can_send_to_recipient(send_to, key_type, service, allow_guest_list_recipients=True):
if not service_allowed_to_send_to(send_to, service, key_type, allow_guest_list_recipients):
if key_type == KEY_TYPE_TEAM:
message = 'Cant send to this recipient using a team-only API key'
else:
@@ -109,11 +109,11 @@ def check_if_service_can_send_files_by_email(service_contact_link, service_id):
)
def validate_and_format_recipient(send_to, key_type, service, notification_type, allow_whitelisted_recipients=True):
def validate_and_format_recipient(send_to, key_type, service, notification_type, allow_guest_list_recipients=True):
if send_to is None:
raise BadRequestError(message="Recipient can't be empty")
service_can_send_to_recipient(send_to, key_type, service, allow_whitelisted_recipients)
service_can_send_to_recipient(send_to, key_type, service, allow_guest_list_recipients)
if notification_type == SMS_TYPE:
international_phone_info = check_if_service_can_send_to_number(service, send_to)