remotes/1693045480750635534/spooky-22
Aevann1 2021-08-06 22:47:15 +02:00
parent 70783d2ba0
commit fa3e742a60
1 changed files with 5 additions and 1 deletions

View File

@ -78,7 +78,7 @@ def post_pid_comment_cid(cid, pid=None, anything=None, v=None):
current_ids = [comment.id]
for i in range(6 - context):
for i in range(200 - context):
if v:
votes = g.db.query(CommentVote).filter_by(user_id=v.id).subquery()
@ -111,6 +111,8 @@ def post_pid_comment_cid(cid, pid=None, anything=None, v=None):
isouter=True
)
if comments.count() == 0: break
if sort == "top":
comments = sorted(comments.all(), key=lambda x: x[0].score, reverse=True)
elif sort == "bottom":
@ -143,6 +145,8 @@ def post_pid_comment_cid(cid, pid=None, anything=None, v=None):
Comment.parent_comment_id.in_(current_ids)
)
if comments.count() == 0: break
if sort == "top":
output = sorted(comments.all(), key=lambda x: x.score, reverse=True)
elif sort == "bottom":