diff options
author | Eugen Rochko <eugen@zeonfederated.com> | 2022-05-26 22:06:10 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-05-26 22:06:10 +0200 |
commit | 1ff4877945e18820f3e518a1cfbac243da65e1a5 (patch) | |
tree | b71087d53c1a3edef8a26173e4957590bf7669c2 | |
parent | 976cd6413e9b2a1531a2ad17945342deaeec538c (diff) |
Fix empty votes arbitrarily increasing voters count in polls (#18526)
-rw-r--r-- | app/services/vote_service.rb | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/app/services/vote_service.rb b/app/services/vote_service.rb index ccd04dbfc..114ec285c 100644 --- a/app/services/vote_service.rb +++ b/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 |