Skip to content
Extraits de code Groupes Projets
Valider 8b43d6bf rédigé par Sorin Davidoi's avatar Sorin Davidoi Validation de Eugen Rochko
Parcourir les fichiers

fix(web_push_notification_worker): Guard against deleted notifications (#4379)

parent b8adb4d7
Aucune branche associée trouvée
Aucune étiquette associée trouvée
Aucune requête de fusion associée trouvée
...@@ -9,6 +9,8 @@ class WebPushNotificationWorker ...@@ -9,6 +9,8 @@ class WebPushNotificationWorker
session_activation = SessionActivation.find(session_activation_id) session_activation = SessionActivation.find(session_activation_id)
notification = Notification.find(notification_id) notification = Notification.find(notification_id)
return if session_activation.nil? || notification.nil?
begin begin
session_activation.web_push_subscription.push(notification) session_activation.web_push_subscription.push(notification)
rescue Webpush::InvalidSubscription, Webpush::ExpiredSubscription => e rescue Webpush::InvalidSubscription, Webpush::ExpiredSubscription => e
......
0% Chargement en cours ou .
You are about to add 0 people to the discussion. Proceed with caution.
Terminez d'abord l'édition de ce message.
Veuillez vous inscrire ou vous pour commenter