Remove 'INSOLVENCY' from zip files for insolvency letters

This is at request of DVLA. They would prefer to have zip files with the
same number of arguments in the name. After being offered a few
different options, such as including an org and service id for all zips,
they chose to just remove the 'INSOLVENCY' tag.

For more context see PR that added the tag
https://github.com/alphagov/notifications-api/pull/3006
This commit is contained in:
David McDonald
2020-10-23 09:58:28 +01:00
parent 890a66de46
commit 3dcb97c45a
2 changed files with 12 additions and 104 deletions

View File

@@ -181,10 +181,6 @@ def get_key_and_size_of_letters_to_be_sent_to_print(print_run_deadline, postage)
letter_pdfs = []
for letter in letters_awaiting_sending:
try:
if str(letter.service.organisation_id) == 'f33fdfdd-7533-40cb-b5e8-cd78a1f5d21e':
letter_service_marking = str(letter.service.id) + ".INSOLVENCY"
else:
letter_service_marking = str(letter.service.id)
letter_file_name = get_letter_pdf_filename(
reference=letter.reference,
crown=letter.service.crown,
@@ -195,7 +191,7 @@ def get_key_and_size_of_letters_to_be_sent_to_print(print_run_deadline, postage)
letter_pdfs.append({
"Key": letter_file_name,
"Size": letter_head['ContentLength'],
"ServiceId": letter_service_marking
"ServiceId": str(letter.service.id)
})
except BotoClientError as e:
current_app.logger.exception(