Skip to content

Commit

Permalink
fix where.not nil error in key rotation (#16336)
Browse files Browse the repository at this point in the history
  • Loading branch information
stevenjcumming authored Apr 15, 2024
1 parent 0234cb7 commit 0c474b1
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions app/sidekiq/kms_key_rotation/batch_initiator_job.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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 }
Expand Down

0 comments on commit 0c474b1

Please sign in to comment.