about summary refs log tree commit diff
path: root/app/workers
diff options
context:
space:
mode:
authorThibaut Girka <thib@sitedethib.com>2020-11-03 17:28:54 +0100
committerThibaut Girka <thib@sitedethib.com>2020-11-03 17:28:54 +0100
commitcd675fbe18bbd9e8c6c0fe9ffb6b3037282cd6c9 (patch)
tree763163999f72fccbd0440f57d50cf3dca248422c /app/workers
parentb8e790c3c22693271a4fd74ce34067c462ebf8a3 (diff)
parentf645dad661ba033efdcdd6ca7597e7b8bc7f4f51 (diff)
Merge branch 'master' into glitch-soc/merge-upstream
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