Skip to content
Snippets Groups Projects
Unverified Commit 9d0573f5 authored by Eugen Rochko's avatar Eugen Rochko Committed by GitHub
Browse files

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

parent 555c4e11
No related branches found
No related tags found
No related merge requests found
......@@ -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
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment