Merge branch '47-incorrect-election-cycle'
build_latest / build (push) Successful in 44s
build_release / build (push) Successful in 45s

This commit is contained in:
2024-01-01 13:32:41 -05:00
+5 -2
View File
@@ -31,6 +31,9 @@ def get_datetime(day: str) -> datetime:
if datetime.today().month == 12 and month < 12:
year += 1
if datetime.today().month == 1 and month > 1:
year -= 1
return datetime(year, month, day)
@@ -88,7 +91,7 @@ def get_current_cycle(config: DakinyConfig) -> int:
config (DakinyConfig): Config object to use
Returns:
int: cycle index for active election. -1 for no active cycle
int: cycle index for active election. None for no active cycle
"""
today = datetime.today()
@@ -100,7 +103,7 @@ def get_current_cycle(config: DakinyConfig) -> int:
):
return cycle
return -1
return None
def build_votes_str(config: DakinyConfig) -> str: