WIP: Moderation type registry #26

Closed
cswimr wants to merge 146 commits from aurora-3rd-party into main
Showing only changes of commit 1d825625f3 - Show all commits

View file

@ -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]),