about summary refs log tree commit diff
path: root/app/services
diff options
context:
space:
mode:
Diffstat (limited to 'app/services')
-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 8bab2810e..5b80da03a 100644
--- a/app/services/vote_service.rb
+++ b/app/services/vote_service.rb
@@ -11,6 +11,8 @@ class VoteService < BaseService
     @choices = choices
     @votes   = []
 
+    return if @poll.expired?
+
     ApplicationRecord.transaction do
       @choices.each do |choice|
         @votes << @poll.votes.create!(account: @account, choice: choice)