Skip to content
Snippets Groups Projects
Unverified Commit 1ff48779 authored by Eugen Rochko's avatar Eugen Rochko Committed by GitHub
Browse files

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

parent 976cd641
No related branches found
No related tags found
No related merge requests found
......@@ -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
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment