Skip to content

Commit

Permalink
Fix vote-after-expiration not showing error, count vote as interaction (
Browse files Browse the repository at this point in the history
  • Loading branch information
Gargron authored and hiyuki2578 committed Oct 2, 2019
1 parent c6e9e93 commit 5e201ac
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions app/services/vote_service.rb
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,14 @@ def call(account, poll, choices)
@choices = choices
@votes = []

return if @poll.expired?

ApplicationRecord.transaction do
@choices.each do |choice|
@votes << @poll.votes.create!(account: @account, choice: choice)
end
end

ActivityTracker.increment('activity:interactions')

if @poll.account.local?
distribute_poll!
else
Expand Down

0 comments on commit 5e201ac

Please sign in to comment.