WIP: Moderation type registry #26
1 changed files with 5 additions and 5 deletions
|
@ -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]),
|
||||
|
|
Loading…
Reference in a new issue