From 1d825625f3a27d985b5887e9dd7bdd0db1d1ddee Mon Sep 17 00:00:00 2001 From: SeaswimmerTheFsh Date: Sat, 4 May 2024 14:53:04 -0400 Subject: [PATCH] fix(aurora): fixed some broken conditional statements --- aurora/models.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/aurora/models.py b/aurora/models.py index 9ac8b90..77ce650 100644 --- a/aurora/models.py +++ b/aurora/models.py @@ -51,13 +51,13 @@ class Moderation(BaseModel): "target_type": str(result[3]), "target_id": int(result[4]), "moderator_id": int(result[5]), - "role_id": int(result[6]) if result[6] != "0" else None, + "role_id": int(result[6]) if result[6] is not None else None, "duration": duration, - "end_timestamp": datetime.fromtimestamp(result[8]) if result[8] != 0 else None, - "reason": result[9] if result[9] != "NULL" else None, + "end_timestamp": datetime.fromtimestamp(result[8]) if result[8] is not None else None, + "reason": result[9], "resolved": bool(result[10]), - "resolved_by": result[11] if result[11] != "NULL" else None, - "resolve_reason": result[12] if result[12] != "NULL" else None, + "resolved_by": result[11], + "resolve_reason": result[12], "expired": bool(result[13]), "changes": json.loads(result[14]), "metadata": json.loads(result[15]),