Actually call total_bet_voted in betting poll.
Currently always truthy because it's a non-None first-class function.pull/2/head
parent
81682c7a28
commit
1f234ef67d
|
@ -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!")
|
||||
|
|
Loading…
Reference in New Issue