From c13686205b6004893470bfedb27d9cdf6f567002 Mon Sep 17 00:00:00 2001 From: Aevann1 Date: Mon, 26 Jul 2021 02:34:07 +0200 Subject: [PATCH] dffd --- drama/routes/votes.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/drama/routes/votes.py b/drama/routes/votes.py index d35417e838..eac68798c5 100644 --- a/drama/routes/votes.py +++ b/drama/routes/votes.py @@ -145,17 +145,17 @@ def api_vote_comment(comment_id, x, v): user_id=v.id, comment_id=comment.id).first() if existing: if existing == 0 and x != 0: - post.author.dramacoins += 1 - g.db.add(post.author) + comment.author.dramacoins += 1 + g.db.add(comment.author) elif existing != 0 and x == 0: - post.author.dramacoins -= 1 - g.db.add(post.author) + comment.author.dramacoins -= 1 + g.db.add(comment.author) existing.change_to(x) g.db.add(existing) else: if x != 0: - post.author.dramacoins += 1 - g.db.add(post.author) + comment.author.dramacoins += 1 + g.db.add(comment.author) vote = CommentVote(user_id=v.id, vote_type=x, comment_id=base36decode(comment_id),