From 107c3d6cf8eaffedc6aee8057903a62f36346fb9 Mon Sep 17 00:00:00 2001 From: Andrew Godwin Date: Sun, 4 Dec 2022 21:22:20 -0700 Subject: Fetch post parents live too --- activities/views/search.py | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) (limited to 'activities/views/search.py') diff --git a/activities/views/search.py b/activities/views/search.py index ab37e17..ccfc1a4 100644 --- a/activities/views/search.py +++ b/activities/views/search.py @@ -101,11 +101,7 @@ class Search(FormView): # Try and retrieve the post by URI # (we do not trust the JSON we just got - fetch from source!) try: - post = Post.by_object_uri(document["id"], fetch=True) - # We may need to live-fetch the identity too - if post.author.state == IdentityStates.outdated: - async_to_sync(post.author.fetch_actor)() - return post + return Post.by_object_uri(document["id"], fetch=True) except Post.DoesNotExist: return None -- cgit v1.2.3