diff --git a/files/classes/comment.py b/files/classes/comment.py index e478d92ee..0b008ca4a 100644 --- a/files/classes/comment.py +++ b/files/classes/comment.py @@ -20,7 +20,7 @@ def sort_comments(sort, comments): if sort == 'new': order = Comment.id.desc() elif sort == 'old': - order = comment.id + order = Comment.id elif sort == 'controversial': order = (Comment.upvotes+1)/(Comment.downvotes+1) + (Comment.downvotes+1)/(Comment.upvotes+1), Comment.downvotes.desc() elif sort == "bottom":