correct some sql statement usages. Wasn't matching things properly.

This commit is contained in:
2025-03-11 09:37:27 -04:00
parent 76fbba739f
commit 29a163ec46
2 changed files with 7 additions and 7 deletions
+3 -3
View File
@@ -41,7 +41,7 @@ class GetCog(commands.Cog, name="Get command."):
category_id (str): String representation of Category id to get information from. Is SlashOption.
"""
stmt = (
select(Category).where(col(CategoryGroup.id) == int(group_id)).where(col(Category.id) == int(category_id))
select(Category).where(col(Category.group_id) == int(group_id)).where(col(Category.id) == int(category_id))
)
with Session(engine) as session:
@@ -73,7 +73,7 @@ class GetCog(commands.Cog, name="Get command."):
category_id (str): String representation of Category id to get information from. Is SlashOption.
"""
stmt = (
select(Category).where(col(CategoryGroup.id) == int(group_id)).where(col(Category.id) == int(category_id))
select(Category).where(col(Category.group_id) == int(group_id)).where(col(Category.id) == int(category_id))
)
with Session(engine) as session:
@@ -103,7 +103,7 @@ class GetCog(commands.Cog, name="Get command."):
category_id (str): String representation of Category id to get information from. Is SlashOption.
"""
stmt = (
select(Category).where(col(CategoryGroup.id) == int(group_id)).where(col(Category.id) == int(category_id))
select(Category).where(col(Category.group_id) == int(group_id)).where(col(Category.id) == int(category_id))
)
with Session(engine) as session:
+4 -4
View File
@@ -46,7 +46,7 @@ class SetCog(commands.Cog, name="Set command."):
size (int): Size to set. Is SlashOption.
"""
stmt = (
select(Category).where(col(CategoryGroup.id) == int(group_id)).where(col(Category.id) == int(category_id))
select(Category).where(col(Category.group_id) == int(group_id)).where(col(Category.id) == int(category_id))
)
with Session(engine) as session:
@@ -94,7 +94,7 @@ class SetCog(commands.Cog, name="Set command."):
ascending (bool): Boolean to set. Determines whether scores are sorted ascending or not. Is SlashOption.
"""
stmt = (
select(Category).where(col(CategoryGroup.id) == int(group_id)).where(col(Category.id) == int(category_id))
select(Category).where(col(Category.group_id) == int(group_id)).where(col(Category.id) == int(category_id))
)
with Session(engine) as session:
@@ -144,7 +144,7 @@ class SetCog(commands.Cog, name="Set command."):
validated (bool): Boolean to set. Determines whether scores are validated or not. Is SlashOption.
"""
stmt = (
select(Category).where(col(CategoryGroup.id) == int(group_id)).where(col(Category.id) == int(category_id))
select(Category).where(col(Category.group_id) == int(group_id)).where(col(Category.id) == int(category_id))
)
with Session(engine) as session:
@@ -191,7 +191,7 @@ class SetCog(commands.Cog, name="Set command."):
name (str): The name to update the category's name to. Is SlashOption.
"""
stmt = (
select(Category).where(col(CategoryGroup.id) == int(group_id)).where(col(Category.id) == int(category_id))
select(Category).where(col(Category.group_id) == int(group_id)).where(col(Category.id) == int(category_id))
)
with Session(engine) as session: