diff --git a/files/routes/votes.py b/files/routes/votes.py index c50afe5ab..3e635baf2 100644 --- a/files/routes/votes.py +++ b/files/routes/votes.py @@ -97,14 +97,14 @@ def vote_post_comment(target_id, new, v, cls, vote_cls): if existing and existing.vote_type == new: return "", 204 if existing: if existing.vote_type == 0 and new != 0: - target.author.pay_account('coins', coin_value) + target.author.coins += coin_value target.author.truescore += coin_delta g.db.add(target.author) existing.vote_type = new existing.coins = coin_value g.db.add(existing) elif existing.vote_type != 0 and new == 0: - target.author.charge_account('coins', existing.coins, should_check_balance=False) + target.author.coins -= existing.coins target.author.truescore -= coin_delta g.db.add(target.author) g.db.delete(existing) @@ -112,7 +112,7 @@ def vote_post_comment(target_id, new, v, cls, vote_cls): existing.vote_type = new g.db.add(existing) elif new != 0: - target.author.pay_account('coins', coin_value) + target.author.coins += coin_value target.author.truescore += coin_delta g.db.add(target.author)