Fix empty votes arbitrarily increasing voters count in polls
This commit is contained in:
parent
e10bf7d51a
commit
d6df33da2e
1 changed files with 2 additions and 0 deletions
|
@ -5,6 +5,8 @@ class VoteService < BaseService
|
||||||
include Payloadable
|
include Payloadable
|
||||||
|
|
||||||
def call(account, poll, choices)
|
def call(account, poll, choices)
|
||||||
|
return if choices.empty?
|
||||||
|
|
||||||
authorize_with account, poll, :vote?
|
authorize_with account, poll, :vote?
|
||||||
|
|
||||||
@account = account
|
@account = account
|
||||||
|
|
Loading…
Reference in a new issue