rly nigga

master
Aevann1 2021-07-24 23:25:00 +02:00
parent fa36d6c39e
commit 4ea67e917a
1 changed files with 4 additions and 9 deletions

View File

@ -434,21 +434,16 @@ def get_comments(cids, v=None, sort="new",
isouter=True
).filter(
Comment.id.in_(cids)
)
).order_by(Comment.id).all()
output = [x[0] for x in query.all()]
for i in range(len(output)):
output[i]._voted = comments[i][1].vote_type if comments[i][1] else 0
output = [x[0] for x in query]
for i in range(len(output)): output[i]._voted = query[i][1].vote_type if query[i][1] else 0
else:
output = g.db.query(Comment).options().filter(Comment.id.in_(cids)).all()
for i in range(len(output)):
output[i]._is_exiled_for=comments[i][1]
output = g.db.query(Comment).options().filter(Comment.id.in_(cids)).order_by(Comment.id).all()
output = sorted(output, key=lambda x: cids.index(x.id))
return output