Commit Graph

12 Commits

Author SHA1 Message Date
Kenneth Kehl
1ecb747c6d reformat 2023-08-29 14:54:30 -07:00
Rebecca Law
d4009ffc52 Rename database management functions.
Rename @transactional to @autocommit.
Rename nested_transaction to tranaction.
2021-04-19 10:56:00 +01:00
Katie Smith
472b86f3f4 Add DAO function and endpoint for archiving SMS senders
Added a new DAO function which archives SMS senders by setting
archived to True. This raises an ArchiveValidationError, if
trying to archive a default SMS sender or an inbound number.

Added a new endpoint for archiving SMS senders.
2018-04-30 15:25:17 +01:00
Katie Smith
663021e494 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.
2018-04-30 15:25:17 +01:00
Rebecca Law
d3fcba621b Remove sms_sender from Service model.
Remove unused dao method.
2017-11-09 14:01:02 +00:00
Rebecca Law
a8adf4d7d7 This PR is to retain current behaviour when we allocate an inbound number for a service.
When a service is allocated an inbound number and they only have one SMS sender, then update that SMS sender to the inbound number.
That way they will not have more than one SMS sender and will not have to choose to use either one.
2017-10-25 11:58:54 +01:00
Rebecca Law
cee916c68a As per review commemnts:
- Add the assert to a test - oops.
- Fix typo in error message.
2017-10-19 13:51:33 +01:00
Rebecca Law
709e24e267 Added endpoints to get sms senders for a service 2017-10-19 10:43:49 +01:00
Rebecca Law
4ac2dc3606 Fix code style 2017-10-18 13:17:52 +01:00
Rebecca Law
4ca6fbc724 Added dao methods needed to add or update multiple sms senders for a service.
Remove the unique constraint for service on the ServiceSmsSender model.
2017-10-18 13:13:23 +01:00
Rebecca Law
5439b01a6e When an inbound number is allocated insert or update a row in service_sms_senders. 2017-09-12 12:09:32 +01:00
Rebecca Law
f624f4f033 Insert and update methods for service_sms_sender 2017-09-11 17:40:37 +01:00