Bugfix following page

This commit is contained in:
Thomas Sileo 2018-07-11 20:27:16 +02:00
parent 1adeee308f
commit d6d20a972e
2 changed files with 4 additions and 4 deletions

View file

@ -10,9 +10,9 @@ from typing import Optional
from bson.objectid import ObjectId from bson.objectid import ObjectId
from feedgen.feed import FeedGenerator from feedgen.feed import FeedGenerator
from html2text import html2text from html2text import html2text
from cachetools import LRUCache
import tasks import tasks
from cachetools import LRUCache
from config import BASE_URL from config import BASE_URL
from config import DB from config import DB
from config import EXTRA_INBOXES from config import EXTRA_INBOXES
@ -181,8 +181,8 @@ class MicroblogPubBackend(Backend):
data = DB.actors.find_one({"remote_id": iri}) data = DB.actors.find_one({"remote_id": iri})
if data: if data:
ACTORS_CACHE[iri] = data['data'] ACTORS_CACHE[iri] = data["data"]
return data['data'] return data["data"]
data = self._fetch_iri(iri) data = self._fetch_iri(iri)
if ap._has_type(data["type"], ap.ACTOR_TYPES): if ap._has_type(data["type"], ap.ACTOR_TYPES):

2
app.py
View file

@ -1569,7 +1569,7 @@ def following():
) )
following, older_than, newer_than = paginated_query(DB.activities, q) 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( return render_template(
"following.html", "following.html",
following_data=following, following_data=following,