Rename ParticipationPoints to EventPoints.
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user