fix comments refactor

master
Aevann1 2022-06-22 22:06:25 +02:00
parent 062542c5af
commit f149198c9f
1 changed files with 1 additions and 1 deletions

View File

@ -20,7 +20,7 @@ def sort_comments(sort, comments):
if sort == 'new': if sort == 'new':
order = Comment.id.desc() order = Comment.id.desc()
elif sort == 'old': elif sort == 'old':
order = comment.id order = Comment.id
elif sort == 'controversial': elif sort == 'controversial':
order = (Comment.upvotes+1)/(Comment.downvotes+1) + (Comment.downvotes+1)/(Comment.upvotes+1), Comment.downvotes.desc() order = (Comment.upvotes+1)/(Comment.downvotes+1) + (Comment.downvotes+1)/(Comment.upvotes+1), Comment.downvotes.desc()
elif sort == "bottom": elif sort == "bottom":