Middle of adding user to council member table. Need to move function for getting election name to utils.
build_develop / build (push) Successful in 1m33s
build_develop / build (push) Successful in 1m33s
This commit is contained in:
@@ -4,6 +4,8 @@ File contains util functions.
|
||||
|
||||
from datetime import datetime
|
||||
|
||||
from config import DakinyConfig
|
||||
|
||||
|
||||
def get_datetime(day: str) -> datetime:
|
||||
"""
|
||||
@@ -24,3 +26,15 @@ def get_datetime(day: str) -> datetime:
|
||||
year += 1
|
||||
|
||||
return datetime(year, month, day)
|
||||
|
||||
|
||||
def get_election_cycle_name(config: DakinyConfig) -> str:
|
||||
"""
|
||||
Builds the unique name of the current election cycle
|
||||
|
||||
Returns:
|
||||
str: the name of the election cycle
|
||||
"""
|
||||
# TODO finish
|
||||
|
||||
return f"vote-{election_start.year}-{election_cycle.name}"
|
||||
|
||||
Reference in New Issue
Block a user