Merge "only write the candidate list page when the election is in progress"

This commit is contained in:
Zuul 2018-11-06 21:57:21 +00:00 committed by Gerrit Code Review
commit 3219cc1c6a
1 changed files with 7 additions and 6 deletions

View File

@ -96,12 +96,13 @@ def build_archive(serie, list_type):
def build_lists(app):
# Current candidates
candidates_list = utils.build_candidates_list()
if not utils.is_tc_election():
render_list("ptl", candidates_list)
else:
render_list("tc", candidates_list)
if utils.election_is_running():
# Current candidates
candidates_list = utils.build_candidates_list()
if not utils.is_tc_election():
render_list("ptl", candidates_list)
else:
render_list("tc", candidates_list)
# Archived elections
previous_toc = [