From fd24e7d9ee84f7732977414cc4c415a35a3d6b35 Mon Sep 17 00:00:00 2001 From: Aevann1 Date: Thu, 23 Dec 2021 17:37:12 +0200 Subject: [PATCH] fdsfsd --- files/routes/votes.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/files/routes/votes.py b/files/routes/votes.py index 9e65f7a78..34093b4b5 100644 --- a/files/routes/votes.py +++ b/files/routes/votes.py @@ -151,6 +151,8 @@ def api_vote_comment(comment_id, new, v): comment = get_comment(comment_id) + if comment.author_id == AUTOBETTER_ID: return {"error": "forbidden."}, 403 + existing = g.db.query(CommentVote).filter_by(user_id=v.id, comment_id=comment.id).first() if existing and existing.vote_type == new: return "", 204