fix(moderation): fixed duration importing (again)
Some checks failed
Pylint / Pylint (3.10) (push) Failing after 45s

This commit is contained in:
Seaswimmer 2023-12-18 16:43:58 -05:00
parent e2c165297d
commit 555f386553
Signed by: cswimr
GPG key ID: 1EBC234EEDA901AE

View file

@ -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,