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, 2 insertions, 0 deletions
diff --git a/app/workers/web_push_notification_worker.rb b/app/workers/web_push_notification_worker.rb
index da4043ddb..51b8daae7 100644
--- a/app/workers/web_push_notification_worker.rb
+++ b/app/workers/web_push_notification_worker.rb
@@ -9,6 +9,8 @@ class WebPushNotificationWorker
     session_activation = SessionActivation.find(session_activation_id)
     notification = Notification.find(notification_id)
 
+    return if session_activation.nil? || notification.nil?
+
     begin
       session_activation.web_push_subscription.push(notification)
     rescue Webpush::InvalidSubscription, Webpush::ExpiredSubscription => e