From f149198c9f33fcb8313d8ee16cc3903d73d62974 Mon Sep 17 00:00:00 2001 From: Aevann1 Date: Wed, 22 Jun 2022 22:06:25 +0200 Subject: [PATCH] fix comments refactor --- files/classes/comment.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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":