From da9a3d853eda1173ac8913908d512fb9babbd136 Mon Sep 17 00:00:00 2001 From: Michael Manfre Date: Mon, 5 Dec 2022 18:07:18 -0500 Subject: Fix unset parent variable when viewing top post (#119) --- activities/views/posts.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'activities') diff --git a/activities/views/posts.py b/activities/views/posts.py index 65b324a..1962274 100644 --- a/activities/views/posts.py +++ b/activities/views/posts.py @@ -34,11 +34,12 @@ class Individual(TemplateView): return super().get(request) def get_context_data(self): + parent = None if self.post_obj.in_reply_to: try: parent = Post.by_object_uri(self.post_obj.in_reply_to, fetch=True) except Post.DoesNotExist: - parent = None + pass return { "identity": self.identity, "post": self.post_obj, -- cgit v1.2.3