Save recipient address in the "to" field of a notification

When a precompiled letter is sent via the admin app, we now pass in the address which can be set in the Notifications.to field.
Once a precompiled letters sent by the API has passed validation we can set the address in Notifications.to field.

The celery tasks to validate precompiled letters sent by the API will be done in another PR.
This commit is contained in:
Rebecca Law
2020-01-02 16:35:18 +00:00
parent 5ebd9a473c
commit bb2b514e12
6 changed files with 29 additions and 15 deletions

View File

@@ -309,7 +309,6 @@ def process_sanitised_letter(
validation_status,
filename,
notification_id,
recipient_address=None
):
current_app.logger.info('Processing sanitised letter with id {}'.format(notification_id))
notification = get_notification_by_id(notification_id, _raise=True)