Pass letter logo filename to template preview

We now pass `filename`, the filename of the letter logo to use, through
to Template Preview in addition to the `dvla_org_id`. Once Template
Preview has been updated to only use the `filename` we will stop
sending the `dvla_org_id`.
This commit is contained in:
Katie Smith
2018-10-17 16:31:27 +01:00
parent 51a18ef0b4
commit 4dab4fa8ce
3 changed files with 13 additions and 3 deletions

View File

@@ -54,6 +54,7 @@ def create_letters_pdf(self, notification_id):
notification.template,
contact_block=notification.reply_to_text,
org_id=notification.service.dvla_organisation.id,
filename=notification.service.dvla_organisation.filename,
values=notification.personalisation
)
@@ -79,7 +80,7 @@ def create_letters_pdf(self, notification_id):
update_notification_status_by_id(notification_id, 'technical-failure')
def get_letters_pdf(template, contact_block, org_id, values):
def get_letters_pdf(template, contact_block, org_id, filename, values):
template_for_letter_print = {
"subject": template.subject,
"content": template.content
@@ -89,6 +90,7 @@ def get_letters_pdf(template, contact_block, org_id, values):
'letter_contact_block': contact_block,
'template': template_for_letter_print,
'values': values,
'filename': filename,
'dvla_org_id': org_id,
}
resp = requests_post(