fix(aurora): finally actually maybe fixed the pydantic validation error
This commit is contained in:
parent
39cb5feb50
commit
ed923f1d9b
1 changed files with 1 additions and 3 deletions
|
@ -176,8 +176,6 @@ class Moderation(AuroraGuildModel):
|
||||||
if changes:
|
if changes:
|
||||||
for change in changes:
|
for change in changes:
|
||||||
change_obj_list.append(Change.from_dict(bot=bot, data=change))
|
change_obj_list.append(Change.from_dict(bot=bot, data=change))
|
||||||
else:
|
|
||||||
change_obj_list = []
|
|
||||||
|
|
||||||
if result[15] is not None:
|
if result[15] is not None:
|
||||||
metadata = json.loads(result[15])
|
metadata = json.loads(result[15])
|
||||||
|
@ -201,7 +199,7 @@ class Moderation(AuroraGuildModel):
|
||||||
"resolve_reason": result[12],
|
"resolve_reason": result[12],
|
||||||
"expired": bool(result[13]),
|
"expired": bool(result[13]),
|
||||||
"changes": change_obj_list,
|
"changes": change_obj_list,
|
||||||
"metadata": metadata,
|
"metadata": metadata if metadata else {},
|
||||||
}
|
}
|
||||||
logger.debug(case)
|
logger.debug(case)
|
||||||
return cls.from_dict(bot=bot, data=case)
|
return cls.from_dict(bot=bot, data=case)
|
||||||
|
|
Loading…
Reference in a new issue