forked from MarseyWorld/MarseyWorld
fix comments refactor
parent
062542c5af
commit
f149198c9f
|
@ -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":
|
||||||
|
|
Loading…
Reference in New Issue