fix(aurora): get_next_case_number now only retrieves the first entry in the sql database (using LIMIT 1
)
This commit is contained in:
parent
b252343dc0
commit
3fdc54b7cb
1 changed files with 1 additions and 1 deletions
|
@ -249,7 +249,7 @@ class Moderation(AuroraGuildModel):
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def get_next_case_number(cls, bot: Red, guild_id: int, cursor: Cursor | None = None) -> int:
|
def get_next_case_number(cls, bot: Red, guild_id: int, cursor: Cursor | None = None) -> int:
|
||||||
result = cls.get_latest(bot=bot, guild_id=guild_id, cursor=cursor)
|
result = cls.get_latest(bot=bot, guild_id=guild_id, cursor=cursor, limit=1)
|
||||||
return (result[0].moderation_id + 1) if result else 1
|
return (result[0].moderation_id + 1) if result else 1
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
|
|
Loading…
Reference in a new issue