move functions to get election cycle index and name into utils.
build_develop / build (push) Successful in 1m52s
build_develop / build (push) Successful in 1m52s
This commit is contained in:
@@ -152,7 +152,7 @@ class ElectionCycle:
|
||||
"""
|
||||
# create new channel for election
|
||||
category: nextcord.CategoryChannel = self.guild.get_channel(self.config.params.active_category_id)
|
||||
quarter_name: str = get_election_cycle_name()
|
||||
quarter_name: str = get_election_cycle_name(self.config)
|
||||
|
||||
# create new entry into database.
|
||||
election_channel: nextcord.TextChannel = await category.create_text_channel(quarter_name)
|
||||
@@ -226,5 +226,7 @@ class ElectionCycle:
|
||||
"""
|
||||
|
||||
with Session(engine) as session:
|
||||
stmt = select(ElectionInformation).where(ElectionInformation.ElectionCycle == get_election_cycle_name())
|
||||
stmt = select(ElectionInformation).where(
|
||||
ElectionInformation.ElectionCycle == get_election_cycle_name(self.config)
|
||||
)
|
||||
return session.scalar(stmt)
|
||||
|
||||
Reference in New Issue
Block a user