Upgrade rubocop from v1.84.0 to v1.84.2, update config, and correct offences (#37795)

This commit is contained in:
Nicholas La Roux
2026-02-17 09:56:46 -05:00
committed by GitHub
parent 0b66e74426
commit 438602c488
31 changed files with 132 additions and 129 deletions

View File

@@ -5,9 +5,9 @@ class RemoveInvalidWebPushSubscription < ActiveRecord::Migration[5.2]
def up
invalid_web_push_subscriptions = Web::PushSubscription.where(endpoint: '')
.or(Web::PushSubscription.where(key_p256dh: ''))
.or(Web::PushSubscription.where(key_auth: ''))
.preload(:session_activation)
.or(Web::PushSubscription.where(key_p256dh: ''))
.or(Web::PushSubscription.where(key_auth: ''))
.preload(:session_activation)
invalid_web_push_subscriptions.find_each do |web_push_subscription|
web_push_subscription.session_activation&.update!(web_push_subscription_id: nil)
web_push_subscription.destroy!