Clean up more mmg and firetext references

This commit is contained in:
Ryan Ahearn
2022-12-19 10:48:53 -05:00
parent 6a04be0370
commit 041cd08097
17 changed files with 106 additions and 128 deletions

View File

@@ -104,7 +104,7 @@ def _update_notification_status(notification, status, provider_response=None):
@autocommit
def update_notification_status_by_id(notification_id, status, sent_by=None, detailed_status_code=None):
def update_notification_status_by_id(notification_id, status, sent_by=None):
notification = Notification.query.with_for_update().filter(Notification.id == notification_id).first()
if not notification:
@@ -134,8 +134,7 @@ def update_notification_status_by_id(notification_id, status, sent_by=None, deta
notification.sent_by = sent_by
return _update_notification_status(
notification=notification,
status=status,
detailed_status_code=detailed_status_code
status=status
)

View File

@@ -24,10 +24,8 @@ def get_provider_details_by_identifier(identifier):
def get_alternative_sms_provider(identifier):
if identifier == 'firetext':
return 'mmg'
elif identifier == 'mmg':
return 'firetext'
if identifier == 'sns':
raise Exception("No alternative SMS providers currently available")
raise ValueError('Unrecognised sms provider {}'.format(identifier))