Add handling for bad quarter name.
build_develop / build (push) Successful in 48s

This commit is contained in:
2024-05-09 23:33:23 -04:00
parent 058bdfef50
commit fea590bf9a
+6 -2
View File
@@ -5,7 +5,6 @@ Commands for viewing information in the database.
import nextcord import nextcord
import pandas as pd import pandas as pd
from nextcord.ext import commands from nextcord.ext import commands
from numpy import indices
from sqlalchemy import select from sqlalchemy import select
from sqlalchemy.orm import Session from sqlalchemy.orm import Session
@@ -59,8 +58,13 @@ class ViewCog(commands.Cog, name="View Commands"):
con=engine, con=engine,
) )
cycles = df.groupby("Cycle") if df.empty:
await interaction.followup.send(
f'Quarter "{quarter_name}" is invalid.', ephemeral=True
)
return
cycles = df.groupby("Cycle")
content = "" content = ""
for cycle in cycles.groups: for cycle in cycles.groups:
content += f"```{cycle}```\n" content += f"```{cycle}```\n"