mirror of
https://github.com/GSA/notifications-api.git
synced 2026-02-03 09:51:11 -05:00
treat 40604 and GOVUK as not having a sender ID
in prep for removing the 40604-as-default, first we need to make sure that if you either have GOVUK or None as your sms sender, then we send GOVUK through to the provider
This commit is contained in:
@@ -287,7 +287,7 @@ class Live(Config):
|
||||
NOTIFY_ENVIRONMENT = 'live'
|
||||
CSV_UPLOAD_BUCKET_NAME = 'live-notifications-csv-upload'
|
||||
STATSD_ENABLED = True
|
||||
FROM_NUMBER = '40604'
|
||||
FROM_NUMBER = 'GOVUK'
|
||||
FUNCTIONAL_TEST_PROVIDER_SERVICE_ID = '6c1d81bb-dae2-4ee9-80b0-89a4aae9f649'
|
||||
FUNCTIONAL_TEST_PROVIDER_SMS_TEMPLATE_ID = 'ba9e1789-a804-40b8-871f-cc60d4c1286f'
|
||||
PERFORMANCE_PLATFORM_ENABLED = True
|
||||
|
||||
@@ -23,6 +23,7 @@ from app.celery.statistics_tasks import record_initial_job_statistics, create_in
|
||||
|
||||
def send_sms_to_provider(notification):
|
||||
service = notification.service
|
||||
|
||||
if not service.active:
|
||||
technical_failure(notification=notification)
|
||||
return
|
||||
@@ -37,7 +38,7 @@ def send_sms_to_provider(notification):
|
||||
template_model.__dict__,
|
||||
values=notification.personalisation,
|
||||
prefix=service.name,
|
||||
sender=service.sms_sender
|
||||
sender=service.sms_sender not in {None, current_app.config['FROM_NUMBER']}
|
||||
)
|
||||
|
||||
if service.research_mode or notification.key_type == KEY_TYPE_TEST:
|
||||
@@ -50,7 +51,7 @@ def send_sms_to_provider(notification):
|
||||
to=validate_and_format_phone_number(notification.to, international=notification.international),
|
||||
content=str(template),
|
||||
reference=str(notification.id),
|
||||
sender=service.sms_sender
|
||||
sender=service.sms_sender or current_app.config['FROM_NUMBER']
|
||||
)
|
||||
except Exception as e:
|
||||
dao_toggle_sms_provider(provider.name)
|
||||
|
||||
Reference in New Issue
Block a user