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.
This commit is contained in:
Chris Hill-Scott
2016-04-06 14:04:02 +01:00
parent 65860c458b
commit aa3274440b

View File

@@ -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 %}