From 7036d553a4c6d5d1c37faf49276a2b9e9db19e0c Mon Sep 17 00:00:00 2001
From: Edmar Martineli <edmar@usp.br>
Date: Sat, 27 Feb 2021 10:31:13 -0300
Subject: [PATCH] The election object was not provided when the email is sent

---
 helios/tasks.py | 1 +
 1 file changed, 1 insertion(+)

diff --git a/helios/tasks.py b/helios/tasks.py
index a1079c1..4aa1de4 100644
--- a/helios/tasks.py
+++ b/helios/tasks.py
@@ -65,6 +65,7 @@ def single_voter_email(voter_uuid, subject_template, body_template, extra_vars={
     voter = Voter.objects.get(uuid=voter_uuid)
 
     the_vars = copy.copy(extra_vars)
+    the_vars.update({'election': voter.election})
     the_vars.update({'voter': voter})
 
     subject = render_template_raw(None, subject_template, the_vars)
-- 
GitLab