diff options
author | Thibaut Girka <thib@sitedethib.com> | 2019-03-08 00:57:13 +0100 |
---|---|---|
committer | Thibaut Girka <thib@sitedethib.com> | 2019-03-08 00:57:13 +0100 |
commit | 5528719bc9fd4e8dca0e5e51de183a6dd27b4d55 (patch) | |
tree | 30e615140e1afbe8d7d8986fe4743d1e4aeb7a03 /app/services/vote_service.rb | |
parent | 38e9c66f34d7054357a3de63834f182734d43d75 (diff) | |
parent | 3aaac4f134eb092baeb0ba5979bdb3abd702a4ee (diff) |
Merge branch 'master' into glitch-soc/merge-upstream
Diffstat (limited to 'app/services/vote_service.rb')
-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 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) |