From 83eb65ef52734c635dd25212d5adf5adcf37c0fd Mon Sep 17 00:00:00 2001 From: stevenjcumming <134282106+stevenjcumming@users.noreply.github.com> Date: Mon, 15 Apr 2024 11:53:42 -0400 Subject: [PATCH] fix where.not nil error in key rotation --- app/sidekiq/kms_key_rotation/batch_initiator_job.rb | 1 + 1 file changed, 1 insertion(+) diff --git a/app/sidekiq/kms_key_rotation/batch_initiator_job.rb b/app/sidekiq/kms_key_rotation/batch_initiator_job.rb index 752f657f6db..efc005537bd 100644 --- a/app/sidekiq/kms_key_rotation/batch_initiator_job.rb +++ b/app/sidekiq/kms_key_rotation/batch_initiator_job.rb @@ -45,6 +45,7 @@ def gids_for_model(model, max_records_per_batch) model .where.not('encrypted_kms_key LIKE ?', "v#{KmsEncryptedModelPatch.kms_version}:%") + .or(model.where(encrypted_kms_key: nil)) .limit(max_records_per_batch) .pluck(model.primary_key) .map { |id| URI::GID.build(app: GlobalID.app, model_name: model.name, model_id: id).to_s }