Fix vote-after-expiration not showing error, count vote as interaction (#10352)

master
Eugen Rochko 5 years ago committed by GitHub
parent 555c4e11ba
commit 9d0573f574
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 4
      app/services/vote_service.rb

@ -11,14 +11,14 @@ 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)
end
end
ActivityTracker.increment('activity:interactions')
if @poll.account.local?
distribute_poll!
else

Loading…
Cancel
Save