only write the candidate list page when the election is in progress
This is a partial fix for the fact that the candidate list does not appear in any toctree. It disables generating the list page so that outside of election season (like now) we can enable the sphinx flag to treat warnings as errors. Change-Id: Icc308470b660a7336efe5f648ac28233efadad80 Signed-off-by: Doug Hellmann <doug@doughellmann.com>
This commit is contained in:
parent
f02357456e
commit
63f41dd8b2
@ -96,12 +96,13 @@ def build_archive(serie, list_type):
|
|||||||
|
|
||||||
|
|
||||||
def build_lists(app):
|
def build_lists(app):
|
||||||
# Current candidates
|
if utils.election_is_running():
|
||||||
candidates_list = utils.build_candidates_list()
|
# Current candidates
|
||||||
if not utils.is_tc_election():
|
candidates_list = utils.build_candidates_list()
|
||||||
render_list("ptl", candidates_list)
|
if not utils.is_tc_election():
|
||||||
else:
|
render_list("ptl", candidates_list)
|
||||||
render_list("tc", candidates_list)
|
else:
|
||||||
|
render_list("tc", candidates_list)
|
||||||
|
|
||||||
# Archived elections
|
# Archived elections
|
||||||
previous_toc = [
|
previous_toc = [
|
||||||
|
Loading…
Reference in New Issue
Block a user