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

This commit is contained in:
Eugen Rochko 2022-05-26 22:06:10 +02:00 committed by GitHub
parent 976cd6413e
commit 1ff4877945
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

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