Skip to content
Snippets Groups Projects
Commit 9a39b4e5 authored by Ben Adida's avatar Ben Adida Committed by GitHub
Browse files

don't error out if session has been cleared on cast done page.

parent d62ef202
Branches
No related tags found
No related merge requests found
...@@ -8,10 +8,12 @@ ...@@ -8,10 +8,12 @@
Congratulations, your vote has been <b><u>successfully cast</u></b>! Congratulations, your vote has been <b><u>successfully cast</u></b>!
</p> </p>
{% if vote_hash %}
<p> <p>
Your smart ballot tracker is:<br /><br /> Your smart ballot tracker is:<br /><br />
<tt style="font-size:1.8em; font-weight: bold; padding-left: 20px;"> {{vote_hash}}</tt> <tt style="font-size:1.8em; font-weight: bold; padding-left: 20px;"> {{vote_hash}}</tt>
</p> </p>
{% endif %}
{% if logout %} {% if logout %}
<p><b>For your safety, we have logged you out.</b></p> <p><b>For your safety, we have logged you out.</b></p>
......
...@@ -776,17 +776,9 @@ def one_election_cast_done(request, election): ...@@ -776,17 +776,9 @@ def one_election_cast_done(request, election):
save_in_session_across_logouts(request, 'last_vote_hash', vote_hash) save_in_session_across_logouts(request, 'last_vote_hash', vote_hash)
save_in_session_across_logouts(request, 'last_vote_cv_url', cv_url) save_in_session_across_logouts(request, 'last_vote_cv_url', cv_url)
else: else:
vote_hash = request.session['last_vote_hash'] vote_hash = request.session.get('last_vote_hash', None)
cv_url = request.session['last_vote_cv_url']
logout = False logout = False
# local logout ensures that there's no more
# user locally
# WHY DO WE COMMENT THIS OUT? because we want to force a full logout via the iframe, including
# from remote systems, just in case, i.e. CAS
# if logout:
# auth_views.do_local_logout(request)
# remote logout is happening asynchronously in an iframe to be modular given the logout mechanism # remote logout is happening asynchronously in an iframe to be modular given the logout mechanism
# include_user is set to False if logout is happening # include_user is set to False if logout is happening
return render_template(request, 'cast_done', {'election': election, return render_template(request, 'cast_done', {'election': election,
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment