From c2c8644d430e89f9d82e32def5e6d72723fa0950 Mon Sep 17 00:00:00 2001 From: SeaswimmerTheFsh Date: Fri, 15 Dec 2023 21:51:51 -0500 Subject: [PATCH] fix(moderation): fixed changes in imports --- moderation/moderation.py | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/moderation/moderation.py b/moderation/moderation.py index d9c036f..0e3eb59 100644 --- a/moderation/moderation.py +++ b/moderation/moderation.py @@ -1723,12 +1723,15 @@ class Moderation(commands.Cog): if case['resolved']: resolved = 1 - for change in case['changes']: - if change['type'] == 'RESOLVE': - resolved_by = change['staff'] - resolved_reason = change['reason'] - resolve_timestamp = change['timestamp'] / 1000 - break + resolved_by = None + resolved_reason = None + if case['changes']: + for change in case['changes']: + if change['type'] == 'RESOLVE': + resolved_by = change['staff'] + resolved_reason = change['reason'] + resolve_timestamp = change['timestamp'] / 1000 + break if resolved_by is None: resolved_by = '?' if resolved_reason is None: