This commit is contained in:
Aevann1 2021-09-23 21:20:47 +02:00
parent bb084df85b
commit f2cec4a04d
5 changed files with 8 additions and 8 deletions

View file

@ -152,7 +152,7 @@ def post_id(pid, anything=None, v=None):
elif sort == "old":
comments = comments.order_by(Comment.created_utc.asc())
elif sort == "controversial":
comments = comments.order_by(Comment.upvotes * Comment.downvotes)
comments = comments.order_by(-1 * Comment.upvotes * (Comment.downvotes+1))
elif sort == "top":
comments = comments.order_by(Comment.downvotes - Comment.upvotes)
elif sort == "bottom":
@ -177,7 +177,7 @@ def post_id(pid, anything=None, v=None):
elif sort == "old":
comments = comments.order_by(Comment.created_utc.asc())
elif sort == "controversial":
comments = comments.order_by(Comment.upvotes * Comment.downvotes)
comments = comments.order_by(-1 * Comment.upvotes * (Comment.downvotes+1))
elif sort == "top":
comments = comments.order_by(Comment.downvotes - Comment.upvotes)
elif sort == "bottom":