Fix vote-after-expiration not showing error, count vote as interaction (#10352)
parent
c21bdc81d3
commit
2b25f64bf1
|
@ -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…
Reference in New Issue