Forgot to convert some ids to int.

This commit is contained in:
2025-03-07 16:09:33 -05:00
parent 50868988c0
commit f9d765ad92
+13 -5
View File
@@ -45,7 +45,9 @@ class SetCog(commands.Cog, name="Set command."):
category_id (str): String representation of Category id to register channel to. Is SlashOption. category_id (str): String representation of Category id to register channel to. Is SlashOption.
size (int): Size to set. Is SlashOption. size (int): Size to set. Is SlashOption.
""" """
stmt = select(Category).where(col(CategoryGroup.id) == group_id).where(col(Category.id) == int(category_id)) stmt = (
select(Category).where(col(CategoryGroup.id) == int(group_id)).where(col(Category.id) == int(category_id))
)
with Session(engine) as session: with Session(engine) as session:
category = session.scalar(stmt) category = session.scalar(stmt)
@@ -91,7 +93,9 @@ class SetCog(commands.Cog, name="Set command."):
category_id (str): String representation of Category id to register channel to. Is SlashOption. category_id (str): String representation of Category id to register channel to. Is SlashOption.
ascending (bool): Boolean to set. Determines whether scores are sorted ascending or not. Is SlashOption. ascending (bool): Boolean to set. Determines whether scores are sorted ascending or not. Is SlashOption.
""" """
stmt = select(Category).where(col(CategoryGroup.id) == group_id).where(col(Category.id) == int(category_id)) stmt = (
select(Category).where(col(CategoryGroup.id) == int(group_id)).where(col(Category.id) == int(category_id))
)
with Session(engine) as session: with Session(engine) as session:
category = session.scalar(stmt) category = session.scalar(stmt)
@@ -139,7 +143,9 @@ class SetCog(commands.Cog, name="Set command."):
category_id (str): String representation of Category id to register channel to. Is SlashOption. category_id (str): String representation of Category id to register channel to. Is SlashOption.
validated (bool): Boolean to set. Determines whether scores are validated or not. Is SlashOption. validated (bool): Boolean to set. Determines whether scores are validated or not. Is SlashOption.
""" """
stmt = select(Category).where(col(CategoryGroup.id) == group_id).where(col(Category.id) == int(category_id)) stmt = (
select(Category).where(col(CategoryGroup.id) == int(group_id)).where(col(Category.id) == int(category_id))
)
with Session(engine) as session: with Session(engine) as session:
category = session.scalar(stmt) category = session.scalar(stmt)
@@ -184,7 +190,9 @@ class SetCog(commands.Cog, name="Set command."):
category_id (str): String representation of Category id to register channel to. Is SlashOption. category_id (str): String representation of Category id to register channel to. Is SlashOption.
name (str): The name to update the category's name to. Is SlashOption. name (str): The name to update the category's name to. Is SlashOption.
""" """
stmt = select(Category).where(col(CategoryGroup.id) == group_id).where(col(Category.id) == int(category_id)) stmt = (
select(Category).where(col(CategoryGroup.id) == int(group_id)).where(col(Category.id) == int(category_id))
)
with Session(engine) as session: with Session(engine) as session:
category = session.scalar(stmt) category = session.scalar(stmt)
@@ -229,7 +237,7 @@ class SetCog(commands.Cog, name="Set command."):
group_id (str): String representation of Group id to register channel to. Is SlashOption. group_id (str): String representation of Group id to register channel to. Is SlashOption.
name (str): The name to update the group's name to. Is SlashOption. name (str): The name to update the group's name to. Is SlashOption.
""" """
stmt = select(CategoryGroup).where(col(CategoryGroup.id) == group_id) stmt = select(CategoryGroup).where(col(CategoryGroup.id) == int(group_id))
with Session(engine) as session: with Session(engine) as session:
group = session.scalar(stmt) group = session.scalar(stmt)