From 01687ae8e826bbab3bb700c2b83144deb9638adf Mon Sep 17 00:00:00 2001 From: imcompiling Date: Mon, 13 May 2024 21:32:19 -0400 Subject: [PATCH] Reduce duplicate code when getting cycle name. --- utils.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/utils.py b/utils.py index 8775a9e..ed43245 100644 --- a/utils.py +++ b/utils.py @@ -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: