From 3fdc54b7cbb2db0497b21169202e50281e7172e0 Mon Sep 17 00:00:00 2001 From: Seaswimmer Date: Tue, 4 Jun 2024 16:37:28 -0400 Subject: [PATCH] fix(aurora): get_next_case_number now only retrieves the first entry in the sql database (using `LIMIT 1`) --- aurora/models/moderation.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/aurora/models/moderation.py b/aurora/models/moderation.py index 73f7bf0..5a26637 100644 --- a/aurora/models/moderation.py +++ b/aurora/models/moderation.py @@ -249,7 +249,7 @@ class Moderation(AuroraGuildModel): @classmethod 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 @classmethod