This commit is contained in:
Aevann1 2021-10-10 16:21:31 +02:00
parent f0692dbe8d
commit d558eed742
5 changed files with 9 additions and 9 deletions

View file

@ -572,7 +572,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(-1 * Comment.upvotes * func.min(Comment.downvotes, 1))
comments = comments.order_by(-1 * Comment.upvotes * Comment.downvotes)
elif sort == "top":
comments = comments.order_by(Comment.downvotes - Comment.upvotes)
elif sort == "bottom":