Browse Source
Fix empty votes arbitrarily increasing voters count in polls (#18526)
closed-social-glitch-2
Eugen Rochko
2 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with
2 additions and
0 deletions
-
app/services/vote_service.rb
|
|
@ -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 |
|
|
|