Bandaid fix so HC votes can be viewed.
This commit is contained in:
@@ -7,12 +7,7 @@ from nextcord.ext import commands
|
|||||||
from sqlalchemy import select
|
from sqlalchemy import select
|
||||||
from sqlalchemy.orm import Session
|
from sqlalchemy.orm import Session
|
||||||
|
|
||||||
from database_setup.sql_data_classes import (
|
from database_setup.sql_data_classes import Presences, Votes, engine
|
||||||
ElectionInformation,
|
|
||||||
Presences,
|
|
||||||
Votes,
|
|
||||||
engine,
|
|
||||||
)
|
|
||||||
|
|
||||||
|
|
||||||
class ViewCog(commands.Cog, name="View Commands"):
|
class ViewCog(commands.Cog, name="View Commands"):
|
||||||
@@ -121,7 +116,7 @@ class ViewCog(commands.Cog, name="View Commands"):
|
|||||||
"""
|
"""
|
||||||
|
|
||||||
with Session(engine) as session:
|
with Session(engine) as session:
|
||||||
stmt = select(ElectionInformation.ElectionCycle)
|
stmt = select(Votes.ElectionCycle).distinct()
|
||||||
elections = session.scalars(stmt)
|
elections = session.scalars(stmt)
|
||||||
|
|
||||||
# if empty compare string
|
# if empty compare string
|
||||||
|
|||||||
Reference in New Issue
Block a user