Reduce duplicate code when getting cycle name.
build_develop / build (push) Successful in 48s

This commit is contained in:
2024-05-13 21:32:19 -04:00
parent 3089da7282
commit 01687ae8e8
+1 -3
View File
@@ -53,10 +53,8 @@ def get_election_cycle_name(config: DakinyConfig) -> str:
Returns:
str: the name of the election cycle
"""
cycle = get_current_election_cycle(config)
current_cycle = config.election_cycles[cycle]
return f"vote-{get_datetime(current_cycle.term_start).year}-{current_cycle.name}"
return f"vote-{get_cycle_name(config)}"
def get_cycle_name(config: DakinyConfig) -> str: