fix: filter statuses that are None (I accidentally turned on auto delete on mastodon T_T)
This commit is contained in:
parent
4454e598af
commit
d0fa812398
1 changed files with 7 additions and 0 deletions
|
@ -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())
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue