remotes/1693045480750635534/spooky-22
Aevann1 2022-01-31 04:43:05 +02:00
parent c3d40188fe
commit 3f8c9ab930
1 changed files with 4 additions and 4 deletions

View File

@ -179,7 +179,7 @@ def post_id(pid, anything=None, v=None):
elif sort == "bottom":
comments = comments.order_by(Comment.upvotes - Comment.downvotes)
first = [c[0] for c in comments.filter(Comment.slots_result == None, Comment.blackjack_result == None, func.length(Comment.body) > 20).all()]
first = [c[0] for c in comments.filter(or_(and_(Comment.slots_result == None, Comment.blackjack_result == None), func.length(Comment.body) > 20)).all()]
second = [c[0] for c in comments.filter(or_(Comment.slots_result != None, Comment.blackjack_result != None), func.length(Comment.body) <= 20).all()]
comments = first + second
else:
@ -198,7 +198,7 @@ def post_id(pid, anything=None, v=None):
elif sort == "bottom":
comments = comments.order_by(Comment.upvotes - Comment.downvotes)
first = comments.filter(Comment.slots_result == None, Comment.blackjack_result == None, func.length(Comment.body) > 20).all()
first = comments.filter(or_(and_(Comment.slots_result == None, Comment.blackjack_result == None), func.length(Comment.body) > 20)).all()
second = comments.filter(or_(Comment.slots_result != None, Comment.blackjack_result != None), func.length(Comment.body) <= 20).all()
comments = first + second
@ -302,7 +302,7 @@ def viewmore(v, pid, sort, offset):
elif sort == "bottom":
comments = comments.order_by(Comment.upvotes - Comment.downvotes)
first = [c[0] for c in comments.filter(Comment.slots_result == None, Comment.blackjack_result == None, func.length(Comment.body) > 20).all()]
first = [c[0] for c in comments.filter(or_(and_(Comment.slots_result == None, Comment.blackjack_result == None), func.length(Comment.body) > 20)).all()]
second = [c[0] for c in comments.filter(or_(Comment.slots_result != None, Comment.blackjack_result != None), func.length(Comment.body) <= 20).all()]
comments = first + second
comments = comments[offset:]
@ -320,7 +320,7 @@ def viewmore(v, pid, sort, offset):
elif sort == "bottom":
comments = comments.order_by(Comment.upvotes - Comment.downvotes)
first = comments.filter(Comment.slots_result == None, Comment.blackjack_result == None, func.length(Comment.body) > 20).all()
first = comments.filter(or_(and_(Comment.slots_result == None, Comment.blackjack_result == None), func.length(Comment.body) > 20)).all()
second = comments.filter(or_(Comment.slots_result != None, Comment.blackjack_result != None), func.length(Comment.body) <= 20).all()
comments = first + second
comments = comments[offset:]