From 67836d034dfe573d78259cbbcde2d1eadd9e61c5 Mon Sep 17 00:00:00 2001 From: SeaswimmerTheFsh Date: Mon, 18 Dec 2023 16:56:27 -0500 Subject: [PATCH] fix(moderation): updated metadata importing --- moderation/importers/moderation.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/moderation/importers/moderation.py b/moderation/importers/moderation.py index bbe4ec6..65af40e 100644 --- a/moderation/importers/moderation.py +++ b/moderation/importers/moderation.py @@ -60,10 +60,11 @@ class ImportModerationView(ui.View): if "changes" not in case or not case["changes"]: case["changes"] = [] - if "metadata" not in case or not case["metadata"]: - case["metadata"] = {} + if "metadata" not in case: + metadata = {} else: - case["metadata"].update({ + metadata: dict = case["metadata"] + metadata.update({ 'imported_from': 'SeaCogs/Moderation' }) @@ -88,7 +89,7 @@ class ImportModerationView(ui.View): resolved_reason=case["resolve_reason"], expired=case["expired"], changes=case["changes"], - metadata=case["metadata"], + metadata=metadata, database=database, )