Commit Graph

12 Commits

Author SHA1 Message Date
Kenneth Kehl
1ecb747c6d reformat 2023-08-29 14:54:30 -07:00
Ben Thorner
a91fde2fda Run auto-correct on app/ and tests/ 2021-03-12 11:45:45 +00: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
Katie Smith
be28f2e2de Add 'archived' column to the 3 reply_to models
Added a new boolean column, `archived`,  with a default of False to the
three models which are used to specify the 'reply to' address for
notifications:
 * ServiceEmailReplyTo
 * ServiceSmsSender
 * ServiceLetterContact
2018-04-30 15:25:17 +01:00
Leo Hemsted
08494ef206 more flake8. lots of unused imports and variables that didn't get used. i tried to preserve old variable names as comments when it looked like they were useful (eg when they were describing timestamps) 2017-11-28 17:23:09 +00:00
Rebecca Law
0054361044 Refactor the sms sender code to remove any unused methods.
Refactor tests/db/create_service() to behave more like the real world.
Created new create_service_with_inbound_number and create_service_with_defined_sms_sender() test/db methods.
2017-11-07 14:26:18 +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
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
f624f4f033 Insert and update methods for service_sms_sender 2017-09-11 17:40:37 +01:00