Compare commits

...

2 Commits

Author SHA1 Message Date
Casey f8e1ea1661
Merge pull request #23 from hatkidchan/22-crash-when-using-user=auto-on-pleroma-account-with-no-posts
Changed type of `last_status_at` to be nullable
2022-11-12 00:01:51 +03:00
Casey a44df7030d
Changed type of `last_status_at` to be nullable 2022-11-12 00:00:14 +03:00
1 changed files with 2 additions and 2 deletions

View File

@ -72,7 +72,7 @@ class Account:
emojis: List[Emoji]
discoverable: bool
created_at: datetime
last_status_at: datetime
last_status_at: Optional[datetime]
statuses_count: int
followers_count: int
following_count: int
@ -97,7 +97,7 @@ class Account:
emojis=list(map(Emoji.from_dict, data["emojis"])),
discoverable=data.get("discoverable", False),
created_at=_date(data["created_at"]),
last_status_at=_date(data["last_status_at"]),
last_status_at=_date_or_none(data.get("last_status_at")),
statuses_count=data["statuses_count"],
followers_count=data["followers_count"],
following_count=data["following_count"],