about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--app/workers/web_push_notification_worker.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/app/workers/web_push_notification_worker.rb b/app/workers/web_push_notification_worker.rb
index f14efc99e..e8f1d72bd 100644
--- a/app/workers/web_push_notification_worker.rb
+++ b/app/workers/web_push_notification_worker.rb
@@ -9,7 +9,7 @@ class WebPushNotificationWorker
     recipient = Account.find(recipient_id)
     notification = Notification.find(notification_id)
 
-    sessions_with_subscriptions = recipient.user.session_activations.reject { |session| session.web_push_subscription.nil? }
+    sessions_with_subscriptions = recipient.user.session_activations.where.not(web_push_subscription: nil)
 
     sessions_with_subscriptions.each do |session|
       begin