From aa3274440bf48c9a8c78ff4164dd0b16a3eb4a7a Mon Sep 17 00:00:00 2001 From: Chris Hill-Scott Date: Wed, 6 Apr 2016 14:04:02 +0100 Subject: [PATCH] Fix exception on email job page For email jobs, the template needed to look up the service to work out the email_from and from_name. `service` used to be a variable passed through to the view. Now every veiw gets `current_service` instead. This is a quick fix to make things work. --- app/templates/views/jobs/job.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/templates/views/jobs/job.html b/app/templates/views/jobs/job.html index abe0ea76f..268ece999 100644 --- a/app/templates/views/jobs/job.html +++ b/app/templates/views/jobs/job.html @@ -25,8 +25,8 @@ {{ email_message( template.subject, template.formatted_as_markup, - from_address='{}@notifications.service.gov.uk'.format(service.email_from), - from_name=service.name + from_address='{}@notifications.service.gov.uk'.format(current_service.email_from), + from_name=current_service.name )}} {% endif %}