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: