From d0fa812398315a4b0fc98af0368f145e2ab3caa8 Mon Sep 17 00:00:00 2001 From: Ayo Date: Mon, 25 Aug 2025 20:02:39 +0200 Subject: [PATCH] fix: filter statuses that are None (I accidentally turned on auto delete on mastodon T_T) --- threads.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/threads.py b/threads.py index d09262b..610861d 100755 --- a/threads.py +++ b/threads.py @@ -145,6 +145,13 @@ async def home(): # List featured hashtags tags = get_featured_tags() + # ---- NEW: Remove any `None` entries from the status list + # (you can also replace them with a default object if desired) + if statuses is None: + statuses = [] # fallback to an empty list + else: + statuses = [s for s in statuses if s] # keep only truthy statuses + return render_template('_home.html', threads=statuses, tags=tags, app=app, attribution=attribution, render_date=datetime.now())