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 Mar 23, 2019
1 parent d78e598 commit fdedccc
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 fdedccc

Please sign in to comment.