Commit 68941d4d authored by Akihiko Odaki's avatar Akihiko Odaki Committed by Eugen Rochko

Use update method to update session in WebPushNotificationWorker (#4235)

parent 1d2616b7
......@@ -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
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment