Revert "Merge pull request #1334 from alphagov/fix-missing-recipient-on-notification-page"

This reverts commit 6f3bcff32f, reversing
changes made to f8a3132d8b.
This commit is contained in:
Chris Hill-Scott
2017-06-23 15:55:06 +01:00
parent 6f3bcff32f
commit c52bfc5b81
2 changed files with 1 additions and 19 deletions

View File

@@ -57,7 +57,7 @@ def view_notification(service_id, notification_id):
),
show_recipient=True,
)
template.values = get_all_personalisation_from_notification(notification)
template.values = notification['personalisation']
if notification['job']:
job = job_api_client.get_job(service_id, notification['job']['id'])['data']
else:
@@ -106,18 +106,3 @@ def get_single_notification_partials(notification):
notification=notification
),
}
def get_all_personalisation_from_notification(notification):
if notification['template']['template_type'] == 'email':
return dict(
email_address=notification['to'],
**notification['personalisation']
)
if notification['template']['template_type'] == 'sms':
return dict(
phone_number=notification['to'],
**notification['personalisation']
)
if notification['template']['template_type'] == 'letter':
return notification['personalisation']