diff --git a/boards/models/post.py b/boards/models/post.py --- a/boards/models/post.py +++ b/boards/models/post.py @@ -318,10 +318,11 @@ class Post(models.Model): link = cache.get(cache_key) if not link: - if not self.is_opening(): - link = reverse('thread', kwargs={ - 'post_id': self.thread_new.get_opening_post().id}) + '#' + str( - self.id) + opening_post = self.thread_new.get_opening_post() + if self == opening_post: + link = reverse('thread', + kwargs={'post_id': opening_post.id}) + '#' + str( + self.id) else: link = reverse('thread', kwargs={'post_id': self.id})