summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Manfre2022-12-05 18:07:18 -0500
committerGitHub2022-12-05 16:07:18 -0700
commitda9a3d853eda1173ac8913908d512fb9babbd136 (patch)
tree4cae1b8edba8e28bb6eede580a0c2e544eb303c7
parent238268eb3164e418656d3d23defd9d9a52423256 (diff)
downloadtakahe-da9a3d853eda1173ac8913908d512fb9babbd136.tar.gz
takahe-da9a3d853eda1173ac8913908d512fb9babbd136.tar.bz2
takahe-da9a3d853eda1173ac8913908d512fb9babbd136.zip
Fix unset parent variable when viewing top post (#119)
-rw-r--r--activities/views/posts.py3
1 files changed, 2 insertions, 1 deletions
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,