mirror of
https://github.com/GSA/notifications-api.git
synced 2025-12-20 15:31:15 -05:00
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:
@@ -75,8 +75,10 @@ def post_precompiled_letter_notification():
|
||||
|
||||
template = get_precompiled_letter_template(authenticated_service.id)
|
||||
|
||||
# For precompiled letters the to field will be set to Provided as PDF until the validation passes,
|
||||
# then the address of the letter will be set as the to field
|
||||
form['personalisation'] = {
|
||||
'address_line_1': form['reference']
|
||||
'address_line_1': 'Provided as PDF'
|
||||
}
|
||||
|
||||
reply_to = get_reply_to_text(LETTER_TYPE, form, template)
|
||||
|
||||
Reference in New Issue
Block a user