From e62bd62e294bd17caae6496cf10abe009002afa5 Mon Sep 17 00:00:00 2001 From: SeaswimmerTheFsh Date: Thu, 28 Dec 2023 04:56:58 -0500 Subject: [PATCH] fix(aurora): actually fixed duration error --- aurora/importers/aurora.py | 2 +- aurora/importers/galacticbot.py | 2 +- aurora/utilities/database.py | 1 + 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/aurora/importers/aurora.py b/aurora/importers/aurora.py index 21041e9..8270676 100644 --- a/aurora/importers/aurora.py +++ b/aurora/importers/aurora.py @@ -85,7 +85,7 @@ class ImportAuroraView(ui.View): case["target_type"], case["target_id"], case["role_id"], - str(duration), + duration, case["reason"], timestamp=case["timestamp"], resolved=case["resolved"], diff --git a/aurora/importers/galacticbot.py b/aurora/importers/galacticbot.py index 646a05e..1c7ae76 100644 --- a/aurora/importers/galacticbot.py +++ b/aurora/importers/galacticbot.py @@ -123,7 +123,7 @@ class ImportGalacticBotView(ui.View): case['targetType'], case['target'], 0, - str(duration), + duration, reason, timestamp=timestamp, resolved=resolved, diff --git a/aurora/utilities/database.py b/aurora/utilities/database.py index 1875023..762214b 100644 --- a/aurora/utilities/database.py +++ b/aurora/utilities/database.py @@ -127,6 +127,7 @@ async def mysql_log( if duration != "NULL": end_timedelta = datetime.fromtimestamp(timestamp) + duration end_timestamp = int(end_timedelta.timestamp()) + duration = str(duration) else: end_timestamp = 0