Save recipient address in process_sanitised_letter task

If the letter passed sanitisation, the recipient address will be
returned from template preview, so we want to save this as the `to`
field of the notification.
This commit is contained in:
Katie Smith
2020-01-24 10:15:19 +00:00
parent adf9906a96
commit 35e39bcfa8
2 changed files with 11 additions and 5 deletions

View File

@@ -347,7 +347,8 @@ def process_sanitised_letter(sanitise_data):
update_letter_pdf_status(
reference=notification.reference,
status=NOTIFICATION_DELIVERED if is_test_key else NOTIFICATION_CREATED,
billable_units=billable_units
billable_units=billable_units,
recipient_address=letter_details['address']
)
except BotoClientError: