diff options
author | Akihiko Odaki <akihiko.odaki.4i@stu.hosei.ac.jp> | 2017-07-17 18:03:42 +0900 |
---|---|---|
committer | Eugen Rochko <eugen@zeonfederated.com> | 2017-07-17 11:03:42 +0200 |
commit | 68941d4dfa91194eb6c5b9633df6d88440808e71 (patch) | |
tree | 26418f1ca57a37ec39f33a1e61ec478e70d3c06d /app | |
parent | 1d2616b79b6bc5b433092c302967c0ee33bd9845 (diff) |
Use update method to update session in WebPushNotificationWorker (#4235)
Diffstat (limited to 'app')
-rw-r--r-- | app/workers/web_push_notification_worker.rb | 3 |
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 |