Fix empty votes arbitrarily increasing voters count in polls (#18526)

lolsob-rspec
Eugen Rochko 2022-05-26 22:06:10 +02:00 committed by GitHub
parent e871725668
commit 49c6b3736a
1 changed files with 2 additions and 0 deletions

View File

@ -7,6 +7,8 @@ class VoteService < BaseService
include Lockable
def call(account, poll, choices)
return if choices.empty?
authorize_with account, poll, :vote?
@account = account