From 365b9d49c6f3e879a897672ea38e21b4fb80b50b Mon Sep 17 00:00:00 2001 From: Andrew Godwin Date: Sat, 24 Dec 2022 12:27:37 -0700 Subject: [PATCH] Don't error when we don't have a parent post --- activities/services/post.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/activities/services/post.py b/activities/services/post.py index 62e2a61..5745c35 100644 --- a/activities/services/post.py +++ b/activities/services/post.py @@ -97,7 +97,7 @@ class PostService: ancestors: list[Post] = [] ancestor = self.post while ancestor.in_reply_to and len(ancestors) < num_ancestors: - ancestor = self.queryset().get(object_uri=ancestor.in_reply_to) + ancestor = self.queryset().filter(object_uri=ancestor.in_reply_to).first() if ancestor is None: break if ancestor.state in [PostStates.deleted, PostStates.deleted_fanned_out]: