mirror of
https://github.com/jointakahe/takahe.git
synced 2024-11-29 02:31:00 +00:00
Fix unset parent variable when viewing top post (#119)
This commit is contained in:
parent
238268eb31
commit
da9a3d853e
1 changed files with 2 additions and 1 deletions
|
@ -34,11 +34,12 @@ class Individual(TemplateView):
|
||||||
return super().get(request)
|
return super().get(request)
|
||||||
|
|
||||||
def get_context_data(self):
|
def get_context_data(self):
|
||||||
|
parent = None
|
||||||
if self.post_obj.in_reply_to:
|
if self.post_obj.in_reply_to:
|
||||||
try:
|
try:
|
||||||
parent = Post.by_object_uri(self.post_obj.in_reply_to, fetch=True)
|
parent = Post.by_object_uri(self.post_obj.in_reply_to, fetch=True)
|
||||||
except Post.DoesNotExist:
|
except Post.DoesNotExist:
|
||||||
parent = None
|
pass
|
||||||
return {
|
return {
|
||||||
"identity": self.identity,
|
"identity": self.identity,
|
||||||
"post": self.post_obj,
|
"post": self.post_obj,
|
||||||
|
|
Loading…
Reference in a new issue