From 58dada230321f577d6e777174b5ab95569d36a8e Mon Sep 17 00:00:00 2001 From: Aevann1 Date: Fri, 6 Aug 2021 18:50:56 +0200 Subject: [PATCH] fd --- files/helpers/get.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/files/helpers/get.py b/files/helpers/get.py index 8e4fa518a..abf609e09 100644 --- a/files/helpers/get.py +++ b/files/helpers/get.py @@ -187,9 +187,10 @@ def get_comment(i, v=None, graceful=False, **kwargs): ) ).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_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: comment = g.db.query(Comment).filter(Comment.id == i).first()