From a44df7030d58c1ddf3de1f579de0c61a7de851ef Mon Sep 17 00:00:00 2001 From: hkc Date: Sat, 12 Nov 2022 00:00:14 +0300 Subject: [PATCH] Changed type of `last_status_at` to be nullable --- mastoposter/types.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mastoposter/types.py b/mastoposter/types.py index e44d762..8930b8b 100644 --- a/mastoposter/types.py +++ b/mastoposter/types.py @@ -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"],