mirror of
https://github.com/GSA/notifications-api.git
synced 2025-12-20 15:31:15 -05:00
Remove sms_sender from Service model.
Remove unused dao method.
This commit is contained in:
@@ -5,26 +5,6 @@ from app.dao.dao_utils import transactional
|
||||
from app.models import ServiceSmsSender
|
||||
|
||||
|
||||
@transactional
|
||||
def insert_or_update_service_sms_sender(service, sms_sender, inbound_number_id=None):
|
||||
result = db.session.query(
|
||||
ServiceSmsSender
|
||||
).filter(
|
||||
ServiceSmsSender.service_id == service.id
|
||||
).update(
|
||||
{'sms_sender': sms_sender,
|
||||
'inbound_number_id': inbound_number_id
|
||||
}
|
||||
)
|
||||
if result == 0:
|
||||
new_sms_sender = ServiceSmsSender(sms_sender=sms_sender,
|
||||
service=service,
|
||||
is_default=True,
|
||||
inbound_number_id=inbound_number_id
|
||||
)
|
||||
db.session.add(new_sms_sender)
|
||||
|
||||
|
||||
def insert_service_sms_sender(service, sms_sender):
|
||||
"""
|
||||
This method is called from create_service which is wrapped in a transaction.
|
||||
|
||||
@@ -223,7 +223,6 @@ class Service(db.Model, Versioned):
|
||||
created_by_id = db.Column(UUID(as_uuid=True), db.ForeignKey('users.id'), index=True, nullable=False)
|
||||
_reply_to_email_address = db.Column("reply_to_email_address", db.Text, index=False, unique=False, nullable=True)
|
||||
_letter_contact_block = db.Column('letter_contact_block', db.Text, index=False, unique=False, nullable=True)
|
||||
sms_sender = db.Column(db.String(11), nullable=True)
|
||||
prefix_sms = db.Column(db.Boolean, nullable=True, default=True)
|
||||
organisation_id = db.Column(UUID(as_uuid=True), db.ForeignKey('organisation.id'), index=True, nullable=True)
|
||||
free_sms_fragment_limit = db.Column(db.BigInteger, index=False, unique=False, nullable=True)
|
||||
|
||||
Reference in New Issue
Block a user