kopia lustrzana https://github.com/jointakahe/takahe
Don't error when we don't have a parent post
rodzic
834282cf54
commit
365b9d49c6
|
@ -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]:
|
||||
|
|
Ładowanie…
Reference in New Issue