From 1f234ef67d98063abdeb06dd96a62e6dc8769914 Mon Sep 17 00:00:00 2001 From: TLSM Date: Sun, 20 Nov 2022 19:55:34 -0500 Subject: [PATCH] Actually call total_bet_voted in betting poll. Currently always truthy because it's a non-None first-class function. --- files/routes/polls.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/files/routes/polls.py b/files/routes/polls.py index a0ec880cc..5dbf56a54 100644 --- a/files/routes/polls.py +++ b/files/routes/polls.py @@ -20,7 +20,7 @@ def vote_option(option_id, v): abort(403, f"You need to be a member of House {sub.capitalize()} to vote on polls in /h/{sub}") if option.exclusive == 2: - if option.post.total_bet_voted: + if option.post.total_bet_voted(v): abort(403, "You can't bet on a closed poll!") if not v.charge_account('coins', POLL_BET_COINS): abort(400, f"You don't have {POLL_BET_COINS} coins!")