fix 500 when remote follow
This commit is contained in:
parent
f63d02dfc0
commit
029e42524e
1 changed files with 5 additions and 7 deletions
12
app.py
12
app.py
|
@ -1895,12 +1895,8 @@ def followers():
|
||||||
)
|
)
|
||||||
|
|
||||||
raw_followers, older_than, newer_than = paginated_query(DB.activities, q)
|
raw_followers, older_than, newer_than = paginated_query(DB.activities, q)
|
||||||
followers = []
|
followers = [doc["meta"]["actor"]
|
||||||
for doc in raw_followers:
|
for doc in raw_followers if "actor" in doc.get("meta", {})]
|
||||||
try:
|
|
||||||
followers.append(doc["meta"]["actor"])
|
|
||||||
except Exception:
|
|
||||||
pass
|
|
||||||
return render_template(
|
return render_template(
|
||||||
"followers.html",
|
"followers.html",
|
||||||
followers_data=followers,
|
followers_data=followers,
|
||||||
|
@ -1928,7 +1924,9 @@ def following():
|
||||||
abort(404)
|
abort(404)
|
||||||
|
|
||||||
following, older_than, newer_than = paginated_query(DB.activities, q)
|
following, older_than, newer_than = paginated_query(DB.activities, q)
|
||||||
following = [(doc["remote_id"], doc["meta"]["object"]) for doc in following]
|
following = [(doc["remote_id"], doc["meta"]["object"])
|
||||||
|
for doc in following
|
||||||
|
if "remote_id" in doc and "object" in doc.get("meta", {})]
|
||||||
return render_template(
|
return render_template(
|
||||||
"following.html",
|
"following.html",
|
||||||
following_data=following,
|
following_data=following,
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue