Allow international phone numbers in spreadsheet

If a service can send internationally, our CSV validation should not
catch valid international phone numbers. This means calling through
to code added to utils in:
- [ ] https://github.com/alphagov/notifications-utils/pull/156
This commit is contained in:
Chris Hill-Scott
2017-04-26 16:19:49 +01:00
parent d62fbcb4cb
commit fd7a34f1e4
3 changed files with 50 additions and 2 deletions

View File

@@ -218,7 +218,6 @@ def _check_messages(service_id, template_type, upload_id, letters_as_pdf=False):
upload_id=upload_id
) if not letters_as_pdf else None
)
recipients = RecipientCSV(
contents,
template_type=template.template_type,
@@ -228,7 +227,8 @@ def _check_messages(service_id, template_type, upload_id, letters_as_pdf=False):
whitelist=itertools.chain.from_iterable(
[user.name, user.mobile_number, user.email_address] for user in users
) if current_service['restricted'] else None,
remaining_messages=remaining_messages
remaining_messages=remaining_messages,
international_sms=current_service['can_send_international_sms'],
)
if request.args.get('from_test'):