Rename ParticipationPoints to EventPoints.

This commit is contained in:
2024-09-03 10:59:39 -04:00
parent 19e654aed0
commit 7b521893d3
4 changed files with 10 additions and 20 deletions
+4 -6
View File
@@ -7,7 +7,7 @@ from sqlalchemy import select
from sqlalchemy.orm import Session
from database_setup.sql_data_classes import (
ParticipationPoints,
EventPoints,
Presences,
Votes,
engine,
@@ -49,14 +49,12 @@ class ViewCog(commands.Cog, name="View Commands"):
with Session(engine) as session:
if quarter_name:
ppdf = pd.read_sql_query(
sql=session.query(ParticipationPoints)
.where(ParticipationPoints.Cycle.startswith(quarter_name))
.statement,
sql=session.query(EventPoints).where(EventPoints.Cycle.startswith(quarter_name)).statement,
con=engine,
)
else:
ppdf = pd.read_sql_query(
sql=session.query(ParticipationPoints).statement,
sql=session.query(EventPoints).statement,
con=engine,
)
@@ -203,7 +201,7 @@ class ViewCog(commands.Cog, name="View Commands"):
quarter_name (str): String to run autocomplete on.
"""
with Session(engine) as session:
stmt = select(ParticipationPoints.Cycle).distinct()
stmt = select(EventPoints.Cycle).distinct()
quarters = session.scalars(stmt)
# if empty compare string