mirror of
https://github.com/GSA/notifications-api.git
synced 2026-02-03 01:41:05 -05:00
Merge branch 'main' into stvnrlly-remove-broadcasts
This commit is contained in:
@@ -87,6 +87,7 @@ def country_records_delivery(phone_prefix):
|
||||
dlr = INTERNATIONAL_BILLING_RATES[phone_prefix]['attributes']['dlr']
|
||||
return dlr and dlr.lower() == 'yes'
|
||||
|
||||
|
||||
def _decide_permanent_temporary_failure(current_status, status):
|
||||
# If we go from pending to delivered we need to set failure type as temporary-failure
|
||||
if current_status == NOTIFICATION_PENDING and status == NOTIFICATION_PERMANENT_FAILURE:
|
||||
@@ -102,6 +103,7 @@ def _update_notification_status(notification, status, provider_response=None):
|
||||
dao_update_notification(notification)
|
||||
return notification
|
||||
|
||||
|
||||
@autocommit
|
||||
def update_notification_status_by_id(notification_id, status, sent_by=None, detailed_status_code=None):
|
||||
notification = Notification.query.with_for_update().filter(Notification.id == notification_id).first()
|
||||
|
||||
@@ -9,8 +9,6 @@ from sqlalchemy.sql.expression import and_, asc, case, func
|
||||
from app import db
|
||||
from app.dao.dao_utils import VersionOptions, autocommit, version_class
|
||||
from app.dao.date_util import get_current_financial_year
|
||||
from app.dao.email_branding_dao import dao_get_email_branding_by_name
|
||||
from app.dao.letter_branding_dao import dao_get_letter_branding_by_name
|
||||
from app.dao.organisation_dao import dao_get_organisation_by_email_address
|
||||
from app.dao.service_sms_sender_dao import insert_service_sms_sender
|
||||
from app.dao.service_user_dao import dao_get_service_user
|
||||
@@ -47,7 +45,6 @@ from app.models import (
|
||||
VerifyCode,
|
||||
)
|
||||
from app.utils import (
|
||||
email_address_is_nhs,
|
||||
escape_special_characters,
|
||||
get_archived_db_column_value,
|
||||
get_london_midnight_in_utc,
|
||||
|
||||
Reference in New Issue
Block a user