fix(aurora): fixed a pydantic error
This commit is contained in:
parent
b752181781
commit
1313834ea5
2 changed files with 2 additions and 2 deletions
|
@ -101,7 +101,7 @@ class Change(AuroraBaseModel):
|
|||
return await PartialUser.from_id(self.bot, self.user_id)
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls, bot: Red, data: dict) -> "Change":
|
||||
def from_dict(cls, bot: Red, guild_id: int, data: dict) -> "Change":
|
||||
return cls(bot=bot, **data)
|
||||
|
||||
class PartialUser(AuroraBaseModel):
|
||||
|
|
|
@ -137,7 +137,7 @@ def generate_dict(bot: Red, result: dict, guild_id: int) -> dict:
|
|||
changes = json.loads(result[14].strip('"').replace('\\"', '"'))
|
||||
change_obj_list = []
|
||||
for change in changes:
|
||||
change_obj_list.append(Change.from_dict(bot=bot, data=change))
|
||||
change_obj_list.append(Change.from_dict(bot=bot, guild_id=guild_id, data=change))
|
||||
|
||||
case = {
|
||||
"moderation_id": int(result[0]),
|
||||
|
|
Loading…
Reference in a new issue