Forgot to convert some ids to int.
This commit is contained in:
+13
-5
@@ -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.
|
||||
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:
|
||||
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.
|
||||
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:
|
||||
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.
|
||||
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:
|
||||
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.
|
||||
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:
|
||||
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.
|
||||
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:
|
||||
group = session.scalar(stmt)
|
||||
|
||||
Reference in New Issue
Block a user