diff --git a/cogs/commands/view.py b/cogs/commands/view.py index 04197e4..ecb6f7f 100644 --- a/cogs/commands/view.py +++ b/cogs/commands/view.py @@ -7,12 +7,7 @@ from nextcord.ext import commands from sqlalchemy import select from sqlalchemy.orm import Session -from database_setup.sql_data_classes import ( - ElectionInformation, - Presences, - Votes, - engine, -) +from database_setup.sql_data_classes import Presences, Votes, engine class ViewCog(commands.Cog, name="View Commands"): @@ -121,7 +116,7 @@ class ViewCog(commands.Cog, name="View Commands"): """ with Session(engine) as session: - stmt = select(ElectionInformation.ElectionCycle) + stmt = select(Votes.ElectionCycle).distinct() elections = session.scalars(stmt) # if empty compare string