Compare commits
No commits in common. "64758686bb782352f8cb01ded501452bcb640490" and "90be42769c16338d998c854c1a2715fe2ecefa4d" have entirely different histories.
64758686bb
...
90be42769c
2 changed files with 5 additions and 1 deletions
|
@ -60,7 +60,7 @@ class ImportAuroraView(ui.View):
|
||||||
case["target_id"] = int(case["target_id"])
|
case["target_id"] = int(case["target_id"])
|
||||||
case["moderator_id"] = int(case["moderator_id"])
|
case["moderator_id"] = int(case["moderator_id"])
|
||||||
|
|
||||||
if not case.get("changes", None):
|
if "changes" not in case or not case["changes"]:
|
||||||
changes = []
|
changes = []
|
||||||
else:
|
else:
|
||||||
if not isinstance(case["changes"], list):
|
if not isinstance(case["changes"], list):
|
||||||
|
|
|
@ -25,3 +25,7 @@ class AuroraGuildModel(AuroraBaseModel):
|
||||||
|
|
||||||
def dump(self) -> dict:
|
def dump(self) -> dict:
|
||||||
return self.model_dump(exclude={"bot", "guild_id", "guild"})
|
return self.model_dump(exclude={"bot", "guild_id", "guild"})
|
||||||
|
|
||||||
|
def to_json(self, indent: int | None = None, file: Any | None = None, **kwargs) -> str:
|
||||||
|
from ..utilities.json import dump, dumps # pylint: disable=cyclic-import
|
||||||
|
return dump(self.dump(), file, indent=indent, **kwargs) if file else dumps(self.dump(), indent=indent, **kwargs)
|
||||||
|
|
Loading…
Reference in a new issue