fix: filter statuses that are None (I accidentally turned on auto delete on mastodon T_T)

This commit is contained in:
Ayo Ayco 2025-08-25 20:02:39 +02:00
parent 4454e598af
commit d0fa812398

View file

@ -145,6 +145,13 @@ async def home():
# List featured hashtags # List featured hashtags
tags = get_featured_tags() 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()) return render_template('_home.html', threads=statuses, tags=tags, app=app, attribution=attribution, render_date=datetime.now())