fix(aurora): cast timestamps to integers
This commit is contained in:
parent
14dc256919
commit
14750787b2
1 changed files with 6 additions and 6 deletions
|
@ -321,10 +321,10 @@ class Moderation(AuroraGuildModel):
|
||||||
params.append(t.key)
|
params.append(t.key)
|
||||||
if before:
|
if before:
|
||||||
query += " WHERE timestamp < ?"
|
query += " WHERE timestamp < ?"
|
||||||
params.append(before.timestamp())
|
params.append(int(before.timestamp()))
|
||||||
if after:
|
if after:
|
||||||
query += " WHERE timestamp > ?"
|
query += " WHERE timestamp > ?"
|
||||||
params.append(after.timestamp())
|
params.append(int(after.timestamp()))
|
||||||
if limit:
|
if limit:
|
||||||
query += " LIMIT ? OFFSET ?"
|
query += " LIMIT ? OFFSET ?"
|
||||||
params.extend((limit, offset))
|
params.extend((limit, offset))
|
||||||
|
@ -354,10 +354,10 @@ class Moderation(AuroraGuildModel):
|
||||||
params.append(t.key)
|
params.append(t.key)
|
||||||
if before:
|
if before:
|
||||||
query += " AND timestamp < ?"
|
query += " AND timestamp < ?"
|
||||||
params.append(before.timestamp())
|
params.append(int(before.timestamp()))
|
||||||
if after:
|
if after:
|
||||||
query += " AND timestamp > ?"
|
query += " AND timestamp > ?"
|
||||||
params.append(after.timestamp())
|
params.append(int(after.timestamp()))
|
||||||
query += " ORDER BY moderation_id DESC;"
|
query += " ORDER BY moderation_id DESC;"
|
||||||
|
|
||||||
return await cls.execute(bot=bot, guild_id=guild_id, query=query, parameters=params, cursor=cursor)
|
return await cls.execute(bot=bot, guild_id=guild_id, query=query, parameters=params, cursor=cursor)
|
||||||
|
@ -372,10 +372,10 @@ class Moderation(AuroraGuildModel):
|
||||||
params.append(t.key)
|
params.append(t.key)
|
||||||
if before:
|
if before:
|
||||||
query += " AND timestamp < ?"
|
query += " AND timestamp < ?"
|
||||||
params.append(before.timestamp())
|
params.append(int(before.timestamp()))
|
||||||
if after:
|
if after:
|
||||||
query += " AND timestamp > ?"
|
query += " AND timestamp > ?"
|
||||||
params.append(after.timestamp())
|
params.append(int(after.timestamp()))
|
||||||
query += " ORDER BY moderation_id DESC;"
|
query += " ORDER BY moderation_id DESC;"
|
||||||
|
|
||||||
return await cls.execute(bot=bot, guild_id=guild_id, query=query, parameters=params, cursor=cursor)
|
return await cls.execute(bot=bot, guild_id=guild_id, query=query, parameters=params, cursor=cursor)
|
||||||
|
|
Loading…
Reference in a new issue