create pdfs for test templated letters

previously, we didn't create templated letters, and just marked them as
delivered straight away. However, we may need to return PDFs for these
letters, so we should create them the same as live letters. Then update
the functions so that they know where to look for these letters.
This commit is contained in:
Leo Hemsted
2019-09-09 12:44:28 +01:00
parent 22aff482a8
commit 52f7620772
4 changed files with 28 additions and 24 deletions

View File

@@ -67,8 +67,9 @@ def create_letters_pdf(self, notification_id):
upload_letter_pdf(notification, pdf_data)
notification.billable_units = billable_units
dao_update_notification(notification)
if notification.key_type != KEY_TYPE_TEST:
notification.billable_units = billable_units
dao_update_notification(notification)
current_app.logger.info(
'Letter notification reference {reference}: billable units set to {billable_units}'.format(