fix(aurora): fixed update query for /edit if parsed_time is given

This commit is contained in:
Seaswimmer 2023-12-30 04:13:15 -05:00
parent 7d2fd89261
commit f1fbec1fd5
Signed by untrusted user: cswimr
GPG key ID: 1EBC234EEDA901AE

View file

@ -919,7 +919,7 @@ class Aurora(commands.Cog):
if parsed_time:
update_query = f"UPDATE `moderation_{interaction.guild.id}` SET changes = ?, reason = ?, duration = ?, end_timestamp = ? WHERE moderation_id = ?"
cursor.execute(update_query, (json.dumps(changes), reason, parsed_time, end_timestamp, case))
cursor.execute(update_query, (json.dumps(changes), reason, convert_timedelta_to_str(parsed_time), end_timestamp, case))
else:
update_query = f"UPDATE `moderation_{interaction.guild.id}` SET changes = ?, reason = ? WHERE moderation_id = ?"
cursor.execute(update_query, (json.dumps(changes), reason, case))