about summary refs log tree commit diff
path: root/app/services/vote_service.rb
diff options
context:
space:
mode:
Diffstat (limited to 'app/services/vote_service.rb')
-rw-r--r--app/services/vote_service.rb2
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