This commit is contained in:
Aevann1 2022-02-10 01:12:17 +02:00
parent 683be1485c
commit d1b12da8e4
5 changed files with 11 additions and 11 deletions

View file

@ -857,7 +857,7 @@ def u_username_comments(username, v=None):
elif sort == "old":
comments = comments.order_by(Comment.created_utc.asc())
elif sort == "controversial":
comments = comments.order_by(Comment.upvotes/Comment.downvotes + Comment.downvotes/Comment.upvotes)
comments = comments.order_by((Comment.downvotes+1)/(Comment.downvotes+1) + (Comment.downvotes+1)/(Comment.upvotes+1))
elif sort == "top":
comments = comments.order_by(Comment.downvotes - Comment.upvotes)
elif sort == "bottom":