fd
This commit is contained in:
parent
776837fb89
commit
7bce3270a7
1 changed files with 2 additions and 1 deletions
|
@ -187,9 +187,10 @@ def get_comment(i, v=None, graceful=False, **kwargs):
|
||||||
)
|
)
|
||||||
).first()
|
).first()
|
||||||
|
|
||||||
|
vt = g.db.query(CommentVote).filter_by(user_id=v.id, comment_id=Comment.id).first()
|
||||||
comment._is_blocking = block and block.user_id == v.id
|
comment._is_blocking = block and block.user_id == v.id
|
||||||
comment._is_blocked = block and block.target_id == v.id
|
comment._is_blocked = block and block.target_id == v.id
|
||||||
comment._voted = g.db.query(CommentVote).filter_by(user_id=v.id, comment_id=Comment.id).first().vote_type
|
comment._voted = vt.vote_type if vt else 0
|
||||||
|
|
||||||
else:
|
else:
|
||||||
comment = g.db.query(Comment).filter(Comment.id == i).first()
|
comment = g.db.query(Comment).filter(Comment.id == i).first()
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue