mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-08-20 14:29:51 -04:00
Fix API call to send one off letter
As part of making the API call we extra the recipient from the first line of the address. This code was assuming that the recipient would always have the key `address line 1`, but we’re no longer guaranteeing that it will be capitalised and spaced exactly like that.
This commit is contained in:
@@ -1068,7 +1068,7 @@ def send_notification(service_id, template_id):
|
||||
noti = notification_api_client.send_notification(
|
||||
service_id,
|
||||
template_id=db_template['id'],
|
||||
recipient=session['recipient'] or session['placeholders']['address line 1'],
|
||||
recipient=session['recipient'] or Columns(session['placeholders'])['address line 1'],
|
||||
personalisation=session['placeholders'],
|
||||
sender_id=session['sender_id'] if 'sender_id' in session else None
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user