feat(aurora): changed a lot of stuff. THIS IS A BREAKING CHANGE! VERY BREAKING! TAKE DATABASE BACKUPS BEFORE UPDATING TO THIS
Some checks failed
Actions / Lint Code (Ruff & Pylint) (pull_request) Failing after 45s
Actions / Build Documentation (MkDocs) (pull_request) Successful in 33s

This commit is contained in:
SeaswimmerTheFsh 2024-05-04 14:49:07 -04:00
parent e8ca0aeb1c
commit afed1d6a37
Signed by: cswimr
GPG key ID: 5D671B5D03D65A7F
3 changed files with 33 additions and 18 deletions

View file

@ -62,7 +62,12 @@ class ImportAuroraView(ui.View):
case["target_type"] = "USER"
if "role_id" not in case or not case["role_id"]:
case["role_id"] = 0
case["role_id"] = None
else:
case["role_id"] = int(case["role_id"])
case["target_id"] = int(case["target_id"])
case["moderator_id"] = int(case["moderator_id"])
if "changes" not in case or not case["changes"]:
case["changes"] = []
@ -74,11 +79,11 @@ class ImportAuroraView(ui.View):
if not metadata.get("imported_from"):
metadata.update({"imported_from": "Aurora"})
if case["duration"] != "NULL":
if case["duration"] != "NULL" and case["duration"] is not None:
hours, minutes, seconds = map(int, case["duration"].split(":"))
duration = timedelta(hours=hours, minutes=minutes, seconds=seconds)
else:
duration = "NULL"
duration = None
await mysql_log(
self.ctx.guild.id,