fix(aurora): fixed another OperationalError
This commit is contained in:
parent
f3246366ff
commit
cb424ed722
1 changed files with 2 additions and 2 deletions
|
@ -314,7 +314,7 @@ class Moderation(AuroraGuildModel):
|
|||
@classmethod
|
||||
async def get_latest(cls, bot: Red, guild_id: int, before: datetime = None, after: datetime = None, limit: int | None = None, offset: int = 0, types: Iterable[Type] | None = None, cursor: Cursor | None = None) -> Tuple["Moderation"]:
|
||||
params = []
|
||||
query = f"SELECT * FROM moderation_{guild_id} ORDER BY moderation_id DESC"
|
||||
query = f"SELECT * FROM moderation_{guild_id}"
|
||||
conditions = []
|
||||
|
||||
if types:
|
||||
|
@ -334,7 +334,7 @@ class Moderation(AuroraGuildModel):
|
|||
if limit:
|
||||
query += " LIMIT ? OFFSET ?"
|
||||
params.extend((limit, offset))
|
||||
query += ";"
|
||||
query += " ORDER BY moderation_id DESC;"
|
||||
return await cls.execute(bot=bot, guild_id=guild_id, query=query, parameters=tuple(params) if params else (), cursor=cursor)
|
||||
|
||||
@classmethod
|
||||
|
|
Loading…
Reference in a new issue