xvc
This commit is contained in:
parent
d88c686997
commit
7eb78a3bd1
5 changed files with 10 additions and 10 deletions
|
@ -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.downvotes+1)/(Comment.downvotes+1) + (Comment.downvotes+1)/(Comment.upvotes+1))
|
||||
comments = comments.order_by((Comment.upvotes+1)/(Comment.downvotes+1) + (Comment.downvotes+1)/(Comment.upvotes+1), Comment.downvotes.desc())
|
||||
elif sort == "top":
|
||||
comments = comments.order_by(Comment.downvotes - Comment.upvotes)
|
||||
elif sort == "bottom":
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue