diff --git a/boards/models/post.py b/boards/models/post.py --- a/boards/models/post.py +++ b/boards/models/post.py @@ -324,8 +324,8 @@ class Post(models.Model, Viewable): are same for every post and don't need to be computed over and over. """ + thread = self.get_thread() is_opening = kwargs.get(PARAMETER_IS_OPENING, self.is_opening()) - thread = kwargs.get(PARAMETER_THREAD, self.get_thread()) can_bump = kwargs.get(PARAMETER_BUMPABLE, thread.can_bump()) if is_opening: diff --git a/boards/templates/boards/thread.html b/boards/templates/boards/thread.html --- a/boards/templates/boards/thread.html +++ b/boards/templates/boards/thread.html @@ -34,7 +34,7 @@ {% with can_bump=thread.can_bump %} {% for post in thread.get_replies %} {% with is_opening=forloop.first %} - {% post_view post moderator=moderator is_opening=is_opening thread=thread bumpable=can_bump opening_post_id=opening_post.id %} + {% post_view post moderator=moderator is_opening=is_opening bumpable=can_bump opening_post_id=opening_post.id %} {% endwith %} {% endfor %} {% endwith %} diff --git a/boards/templatetags/board.py b/boards/templatetags/board.py --- a/boards/templatetags/board.py +++ b/boards/templatetags/board.py @@ -53,10 +53,7 @@ def post_view(post, moderator=False, nee else: is_opening = post.is_opening() - if 'thread' in kwargs: - thread = kwargs['thread'] - else: - thread = post.get_thread() + thread = post.get_thread() if 'can_bump' in kwargs: can_bump = kwargs['can_bump']