From a8697b0187537dd50ac977640625620393d547e7 Mon Sep 17 00:00:00 2001 From: imcompiling Date: Tue, 9 Jan 2024 20:04:49 -0500 Subject: [PATCH] Bandaid fix so HC votes can be viewed. --- cogs/commands/view.py | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) 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