fix(aurora): fixed some broken conditional statements
This commit is contained in:
parent
ea65816c32
commit
1d825625f3
1 changed files with 5 additions and 5 deletions
|
@ -51,13 +51,13 @@ class Moderation(BaseModel):
|
||||||
"target_type": str(result[3]),
|
"target_type": str(result[3]),
|
||||||
"target_id": int(result[4]),
|
"target_id": int(result[4]),
|
||||||
"moderator_id": int(result[5]),
|
"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,
|
"duration": duration,
|
||||||
"end_timestamp": datetime.fromtimestamp(result[8]) if result[8] != 0 else None,
|
"end_timestamp": datetime.fromtimestamp(result[8]) if result[8] is not None else None,
|
||||||
"reason": result[9] if result[9] != "NULL" else None,
|
"reason": result[9],
|
||||||
"resolved": bool(result[10]),
|
"resolved": bool(result[10]),
|
||||||
"resolved_by": result[11] if result[11] != "NULL" else None,
|
"resolved_by": result[11],
|
||||||
"resolve_reason": result[12] if result[12] != "NULL" else None,
|
"resolve_reason": result[12],
|
||||||
"expired": bool(result[13]),
|
"expired": bool(result[13]),
|
||||||
"changes": json.loads(result[14]),
|
"changes": json.loads(result[14]),
|
||||||
"metadata": json.loads(result[15]),
|
"metadata": json.loads(result[15]),
|
||||||
|
|
Loading…
Reference in a new issue