about summary refs log tree commit diff
path: root/app
diff options
context:
space:
mode:
Diffstat (limited to 'app')
-rw-r--r--app/workers/web_push_notification_worker.rb3
1 files changed, 1 insertions, 2 deletions
diff --git a/app/workers/web_push_notification_worker.rb b/app/workers/web_push_notification_worker.rb
index 0568a3e02..f14efc99e 100644
--- a/app/workers/web_push_notification_worker.rb
+++ b/app/workers/web_push_notification_worker.rb
@@ -17,8 +17,7 @@ class WebPushNotificationWorker
       rescue Webpush::InvalidSubscription, Webpush::ExpiredSubscription
         # Subscription expiration is not currently implemented in any browser
         session.web_push_subscription.destroy!
-        session.web_push_subscription = nil
-        session.save!
+        session.update!(web_push_subscription: nil)
       rescue Webpush::PayloadTooLarge => e
         Rails.logger.error(e)
       end