fix(aurora): make sure that bans with durations are imported as tempbans
Some checks failed
Actions / Build Documentation (MkDocs) (pull_request) Successful in 29s
Actions / Lint Code (Ruff & Pylint) (pull_request) Failing after 51s

This commit is contained in:
Seaswimmer 2024-08-22 15:44:22 -04:00
parent fa27d12de5
commit 320db1b692
Signed by: cswimr
GPG key ID: 3813315477F26F82

View file

@ -86,6 +86,8 @@ class ImportAuroraView(ui.View):
if case["duration"] != "NULL" and case["duration"] is not None:
duration = timedelta_from_string(case["duration"])
if moderation_type.key == "ban":
moderation_type = type_registry["tempban"]
else:
duration = None