From 11fcf2dfb0ec386ab2c8b766b618efe651342715 Mon Sep 17 00:00:00 2001 From: Thomas Sileo Date: Wed, 18 Jul 2018 23:18:39 +0200 Subject: [PATCH] Fix the follower page --- app.py | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/app.py b/app.py index 41605dc..a92d3b2 100644 --- a/app.py +++ b/app.py @@ -1601,8 +1601,13 @@ def followers(): ) ) - followers, older_than, newer_than = paginated_query(DB.activities, q) - followers = [get_backend().fetch_iri(doc["activity"]["actor"]) for doc in followers] + raw_followers, older_than, newer_than = paginated_query(DB.activities, q) + followers = [] + for doc in raw_followers: + try: + followers.append(get_backend().fetch_iri(doc["activity"]["actor"])) + except Exception: + pass return render_template( "followers.html", 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) following, older_than, newer_than = paginated_query(DB.activities, q)