From 74572bfed6e1d374e449117c8a90a0cdf21c693a Mon Sep 17 00:00:00 2001 From: PY Date: Thu, 30 Jan 2025 11:09:04 +0100 Subject: [PATCH] context processor are not called when there is an exception --- envergo/templates/amenagement/base.html | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/envergo/templates/amenagement/base.html b/envergo/templates/amenagement/base.html index 8d49b4b10..ddbfe6f0c 100644 --- a/envergo/templates/amenagement/base.html +++ b/envergo/templates/amenagement/base.html @@ -39,7 +39,10 @@ - {% include 'amenagement/_newsletter_opt_in.html' %} + {% if newsletter_opt_in_form %} + {# If an exception is raised, the newsletter_opt_in_form is not populated into the context#} + {% include 'amenagement/_newsletter_opt_in.html' %} + {% endif %} {% endblock %} {% block footer %}