From e836ead399d74c82c6c8fabfa39063490b422410 Mon Sep 17 00:00:00 2001 From: imcompiling Date: Mon, 1 Jan 2024 13:23:29 -0500 Subject: [PATCH] Force crash on no election cycle. -1 was causing last item in config array to be used. --- utils.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/utils.py b/utils.py index 2ad31a7..c952810 100644 --- a/utils.py +++ b/utils.py @@ -88,7 +88,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 +100,7 @@ def get_current_cycle(config: DakinyConfig) -> int: ): return cycle - return -1 + return None def build_votes_str(config: DakinyConfig) -> str: