Commit Graph

11 Commits

Author SHA1 Message Date
Rebecca Law
d4009ffc52 Rename database management functions.
Rename @transactional to @autocommit.
Rename nested_transaction to tranaction.
2021-04-19 10:56:00 +01:00
Chris Hill-Scott
da1219fadf Let services have no default letter contact blocks
If they delete the default we’ll treat ‘Blank’ as the default on the
frontend.
2019-07-22 10:40:18 +01:00
Chris Hill-Scott
dd225fbc6e Dissociate letter contact blocks before archiving
Otherwise you can’t archive it.
2019-07-19 15:40:28 +01:00
Katie Smith
f2d4bc795e Add DAO function and endpoint for archiving letter contact blocks
Added a new DAO function which archives letter contact blocks by
setting archived to True. This raises an ArchiveValidationError if
trying to archive the default letter block for a service or the default
letter contact block for a template.

Added a new endpoint for archiving letter contact blocks.
2018-04-30 15:25:17 +01:00
Katie Smith
f810daa3c5 Only return non-archived letter contact blocks
Changed DAO functions which return one letter contact block and all
letter contact blocks for a service to only return non-archived ones.
2018-04-30 15:25:17 +01:00
Rebecca Law
d5a1ec0fe3 Remove unused methods 2017-11-20 14:45:11 +00:00
Rebecca Law
577463b0ac Remove create_or_update_email_reply_to and create_or_update_letter_contact - no longer needed.
Remove Services.reply_to_email_address and Services.letter_contact_block
2017-11-20 14:33:15 +00:00
venusbb
212ce302c8 Add get letter contact by id endpoint
Added the GET /<uuid:service_id>/letter-contact/<uuid:letter_contact_id>
endpoint for returning a letter contact for a service with the letter contact id

Added the DAO for returning a letter contact by id
2017-10-04 12:26:38 +01:00
Katie Smith
1fa1ebb96f Add endpoint to return all letter contact blocks
Added the GET '/<uuid:service_id>/letter-contact' endpoint for returning
all letter contact blocks for a service.

Updated the DAO for service letter contacts to return the default letter
contact first.
2017-10-04 11:26:27 +01:00
Imdad Ahad
3977574ef1 Add methods to add/update letter contacts for a service that handle defaults properly 2017-09-25 15:46:01 +01:00
Imdad Ahad
fa3f4f3c20 Add dao to store letter contacts and upsert 2017-09-25 12:26:29 +01:00