mirror of
https://github.com/GSA/notifications-api.git
synced 2025-12-24 01:11:38 -05:00
Only return active SMS senders
Updated the DAO methods which return a single SMS sender and all SMS senders to only return the non-archived senders. Changed the error raised in the Admin interface from a SQLAlchemyError to a BadRequestError.
This commit is contained in:
@@ -418,16 +418,18 @@ def create_reply_to_email(
|
||||
|
||||
|
||||
def create_service_sms_sender(
|
||||
service,
|
||||
sms_sender,
|
||||
is_default=True,
|
||||
inbound_number_id=None
|
||||
service,
|
||||
sms_sender,
|
||||
is_default=True,
|
||||
inbound_number_id=None,
|
||||
archived=False
|
||||
):
|
||||
data = {
|
||||
'service_id': service.id,
|
||||
'sms_sender': sms_sender,
|
||||
'is_default': is_default,
|
||||
'inbound_number_id': inbound_number_id
|
||||
'inbound_number_id': inbound_number_id,
|
||||
'archived': archived,
|
||||
}
|
||||
service_sms_sender = ServiceSmsSender(**data)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user