From d6d20a972e0f80a63fd271a0a04884e1d934cb40 Mon Sep 17 00:00:00 2001 From: Thomas Sileo Date: Wed, 11 Jul 2018 20:27:16 +0200 Subject: [PATCH] Bugfix following page --- activitypub.py | 6 +++--- app.py | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/activitypub.py b/activitypub.py index 1a6a9fe..aeac7e9 100644 --- a/activitypub.py +++ b/activitypub.py @@ -10,9 +10,9 @@ from typing import Optional from bson.objectid import ObjectId from feedgen.feed import FeedGenerator from html2text import html2text -from cachetools import LRUCache import tasks +from cachetools import LRUCache from config import BASE_URL from config import DB from config import EXTRA_INBOXES @@ -181,8 +181,8 @@ class MicroblogPubBackend(Backend): data = DB.actors.find_one({"remote_id": iri}) if data: - ACTORS_CACHE[iri] = data['data'] - return data['data'] + ACTORS_CACHE[iri] = data["data"] + return data["data"] data = self._fetch_iri(iri) if ap._has_type(data["type"], ap.ACTOR_TYPES): diff --git a/app.py b/app.py index e4f4995..0287efc 100644 --- a/app.py +++ b/app.py @@ -1569,7 +1569,7 @@ def following(): ) following, older_than, newer_than = paginated_query(DB.activities, q) - following = [get_backend.fetch_iri(doc["activity"]["object"]) for doc in following] + following = [get_backend().fetch_iri(doc["activity"]["object"]) for doc in following] return render_template( "following.html", following_data=following,