diff options
author | Eugen Rochko <eugen@zeonfederated.com> | 2019-03-23 14:07:17 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-03-23 14:07:17 +0100 |
commit | 9d0573f574f1861731ebfd08bdf0ca8bbd3b4dfb (patch) | |
tree | 39541053b516f8c3c54473a26a734903da37d0dd | |
parent | 555c4e11baf58401c1bdd915e4ecef679e6ae514 (diff) |
Fix vote-after-expiration not showing error, count vote as interaction (#10352)
-rw-r--r-- | app/services/vote_service.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/app/services/vote_service.rb b/app/services/vote_service.rb index 0cace6c00..81af9ef3a 100644 --- a/app/services/vote_service.rb +++ b/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 |