Fix post ordering in reply view
I think this was database-specific. Replies should now be ordered by their ID. Signed-off-by: Alek Ratzloff <alekratz@gmail.com>
This commit is contained in:
@@ -240,7 +240,9 @@ class PostView(TemplateView):
|
||||
def get_context_data(self, **kwargs):
|
||||
kwargs["board"] = self.board
|
||||
post_id = self.kwargs["id"]
|
||||
kwargs["post"] = get_object_or_404(Post, id=post_id)
|
||||
post = get_object_or_404(Post, id=post_id)
|
||||
kwargs["post"] = post
|
||||
kwargs["replies"] = post.replies.all().order_by("id")
|
||||
kwargs["max_upload_size"] = settings.MAX_UPLOAD_SIZE
|
||||
return super(PostView, self).get_context_data(**kwargs)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user