From 61ca35c2dee31130793d8918f00b52a3da506991 Mon Sep 17 00:00:00 2001 From: Aevann Date: Sun, 12 Mar 2023 21:18:08 +0200 Subject: [PATCH] fix polls again --- files/routes/polls.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/files/routes/polls.py b/files/routes/polls.py index 8b5d881ee..8c927e6b5 100644 --- a/files/routes/polls.py +++ b/files/routes/polls.py @@ -84,8 +84,8 @@ def vote_option_comment(option_id, v): if option.exclusive: vote = g.db.query(CommentOptionVote).join(CommentOption).filter( CommentOptionVote.user_id==v.id, - CommentOptionVote.comment_id==option.parent_id, - CommentOption.exclusive==1).one_or_none() + CommentOptionVote.submission_id==option.parent_id, + CommentOption.exclusive==option.exclusive).all() if vote: if option.exclusive == 2: abort(400, "You already voted on this bet!") for x in vote: