From 84bfc3d5e1f6bcc06064773f0a853a29e52aebfd Mon Sep 17 00:00:00 2001 From: Ivan Habunek Date: Thu, 14 Nov 2024 19:35:51 +0100 Subject: [PATCH] Fix timeline generators when status is not set --- toot/api.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/toot/api.py b/toot/api.py index cf7c756..a347fd1 100644 --- a/toot/api.py +++ b/toot/api.py @@ -430,12 +430,12 @@ def _timeline_generator(app, user, path, params=None): def _notification_timeline_generator(app, user, path, params=None): for batch in _timeline_generator(app, user, path, params): - yield [n["status"] for n in batch if n["status"]] + yield [n["status"] for n in batch if n.get("status")] def _conversation_timeline_generator(app, user, path, params=None): for batch in _timeline_generator(app, user, path, params): - yield [c["last_status"] for c in batch if c["last_status"]] + yield [c["last_status"] for c in batch if c.get("last_status")] def home_timeline_generator(app, user, limit=20):