Skip to content

Commit

Permalink
Fixes #38147 - correctly find org on FakeActivationKey (#11280)
Browse files Browse the repository at this point in the history
  • Loading branch information
jeremylenz authored Jan 24, 2025
1 parent fb274fa commit b594562
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions app/lib/katello/util/cveak_migrator.rb
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,9 @@ def execute!
Rails.logger.info "You may want to change the content view / lifecycle environment for these activation keys manually."
end
(aks_with_no_cve + aks_with_missing_cve).each do |ak|
default_content_view = ak.organization.default_content_view
library = ak.organization.library
ak_organization = ::Organization.find_by(id: ak.organization_id)
default_content_view = ak_organization.default_content_view
library = ak_organization.library
Rails.logger.info "Updating activation key #{ak.name} with default content_view_id and lifecycle_environment_id"
ak&.update_columns(content_view_id: default_content_view&.id, environment_id: library&.id)
end
Expand Down

0 comments on commit b594562

Please sign in to comment.