Fix the follower page

This commit is contained in:
Thomas Sileo 2018-07-18 23:18:39 +02:00
parent 66c80e1084
commit 11fcf2dfb0

11
app.py
View file

@ -1601,8 +1601,13 @@ def followers():
) )
) )
followers, older_than, newer_than = paginated_query(DB.activities, q) raw_followers, older_than, newer_than = paginated_query(DB.activities, q)
followers = [get_backend().fetch_iri(doc["activity"]["actor"]) for doc in followers] followers = []
for doc in raw_followers:
try:
followers.append(get_backend().fetch_iri(doc["activity"]["actor"]))
except Exception:
pass
return render_template( return render_template(
"followers.html", "followers.html",
followers_data=followers, followers_data=followers,
@ -1625,7 +1630,7 @@ def following():
) )
) )
if config.HIDE_FOLLOWING: if config.HIDE_FOLLOWING and not session.get("logged_in", False):
abort(404) abort(404)
following, older_than, newer_than = paginated_query(DB.activities, q) following, older_than, newer_than = paginated_query(DB.activities, q)