fix(moderation): updated metadata importing
Some checks failed
Pylint / Pylint (3.10) (push) Failing after 46s

This commit is contained in:
Seaswimmer 2023-12-18 16:56:27 -05:00
parent 452799e5ca
commit 67836d034d
Signed by: cswimr
GPG key ID: 1EBC234EEDA901AE

View file

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