From f8bc67fe48eafdca194dc13eb1bac25408c8260a Mon Sep 17 00:00:00 2001 From: SeaswimmerTheFsh Date: Thu, 5 Oct 2023 14:15:34 -0400 Subject: [PATCH] fix(moderation): don't set 1 to 1 --- moderation/moderation.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/moderation/moderation.py b/moderation/moderation.py index 229a4d3..32d8a0a 100644 --- a/moderation/moderation.py +++ b/moderation/moderation.py @@ -411,7 +411,7 @@ class Moderation(commands.Cog): db = await self.config.mysql_database() guilds: list[discord.Guild] = self.bot.guilds for guild in guilds: - query = f"UPDATE `{db}`.`moderation_{guild.id}` SET expired = 1 WHERE (end_timestamp != 0 AND end_timestamp <= %s AND expired = 0) OR resolved = 1" + query = f"UPDATE `{db}`.`moderation_{guild.id}` SET expired = 1 WHERE (end_timestamp != 0 AND end_timestamp <= %s AND expired = 0) OR (expired = 0 AND resolved = 1)" cursor.execute(query, (time.time(),)) database.commit() cursor.close()