about summary refs log tree commit diff
path: root/app/workers
diff options
context:
space:
mode:
authorFire Demon <firedemon@creature.cafe>2020-11-05 06:02:49 -0600
committerFire Demon <firedemon@creature.cafe>2020-11-05 06:02:49 -0600
commit4e187f6f004b9c4b1a05aa0c721bd674871d4401 (patch)
treec1fa6a2845dba645bec19ed9e5d5cc88fdf8e61c /app/workers
parentfa982ae8d7118c20aa145312b36096a453eeb695 (diff)
parent5a9fc749c3eab8d3c93dd282fa89c20a5cb0e994 (diff)
Merge remote-tracking branch 'upstream/master' into dev
Diffstat (limited to 'app/workers')
-rw-r--r--app/workers/poll_expiration_notify_worker.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/app/workers/poll_expiration_notify_worker.rb b/app/workers/poll_expiration_notify_worker.rb
index 8a12fc075..f0191d479 100644
--- a/app/workers/poll_expiration_notify_worker.rb
+++ b/app/workers/poll_expiration_notify_worker.rb
@@ -15,7 +15,7 @@ class PollExpirationNotifyWorker
     end
 
     # Notify local voters
-    poll.votes.includes(:account).map(&:account).select(&:local?).each do |account|
+    poll.votes.includes(:account).group(:account_id).select(:account_id).map(&:account).select(&:local?).each do |account|
       NotifyService.new.call(account, :poll, poll)
     end
   rescue ActiveRecord::RecordNotFound