diff --git a/boards/models/post.py b/boards/models/post.py --- a/boards/models/post.py +++ b/boards/models/post.py @@ -291,7 +291,7 @@ class Post(models.Model): thread.last_edit_time = edit_time thread.save() - def get_url(self, opening_id=None): + def get_url(self): """ Get full url to this post """ @@ -300,9 +300,7 @@ class Post(models.Model): link = cache.get(cache_key) if not link: - if not opening_id: - opening_post = self.get_thread().get_opening_post() - opening_id = opening_post.id + opening_id = self.get_thread().get_opening_post_id() if self.id != opening_id: link = reverse('thread', kwargs={ diff --git a/boards/templates/boards/post.html b/boards/templates/boards/post.html --- a/boards/templates/boards/post.html +++ b/boards/templates/boards/post.html @@ -31,7 +31,7 @@