fdfd
This commit is contained in:
parent
aa7ab261ed
commit
a01544fab8
1 changed files with 5 additions and 1 deletions
|
@ -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":
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue