From 555f386553ccdbfa06db192159ffd0d5f166fd07 Mon Sep 17 00:00:00 2001 From: SeaswimmerTheFsh Date: Mon, 18 Dec 2023 16:43:58 -0500 Subject: [PATCH] fix(moderation): fixed duration importing (again) --- moderation/importers/moderation.py | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/moderation/importers/moderation.py b/moderation/importers/moderation.py index d48abea..c5a54fe 100644 --- a/moderation/importers/moderation.py +++ b/moderation/importers/moderation.py @@ -69,12 +69,13 @@ class ImportModerationView(ui.View): if 'metadata' not in case or not case['metadata']: case['metadata'] = {} - duration_t = strptime(case['duration'], "%H:%M:%S") - duration = timedelta( - hours=duration_t.hours, - minutes=duration_t.minutes, - seconds=duration_t.seconds - ) + if duration != 'NULL': + duration_t = strptime(case['duration'], "%H:%M:%S") + duration = timedelta( + hours=duration_t.hours, + minutes=duration_t.minutes, + seconds=duration_t.seconds + ) await mysql_log( self.ctx.guild.id,