Skip to content

Commit

Permalink
Fixes #37998 - deb-repos not shown on host repo-set
Browse files Browse the repository at this point in the history
  • Loading branch information
m-bucher committed Nov 8, 2024
1 parent 12b5a3d commit f33bac3
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion app/services/katello/product_content_finder.rb
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ def initialize(params = {})
def product_content
if match_environment
versions = consumable.content_view_environments.select(:content_view_version_id).map(&:content_view_version_id)
environment = consumable.respond_to?(:environment) ? consumable.environment : consumable.content_view_environments.select(:environment_id).map(&:environment_id)
end

considered_products = match_subscription ? consumable.products : consumable.organization.products.enabled.uniq
Expand All @@ -26,7 +27,8 @@ def product_content
structured_apt_roots = roots.where(:content_id => nil)
if structured_apt_roots.any?
deb_repos_query = Katello::Repository.where(root: structured_apt_roots)
deb_repos = match_environment ? deb_repos_query.where(content_view_version: versions, environment: consumable.environment) : deb_repos_query.where(:library_instance_id => nil)
deb_repos = match_environment ? deb_repos_query.where(content_view_version: versions) : deb_repos_query.where(:library_instance_id => nil)
deb_repos = deb_repos.where(environment: environment) if environment
content_ids += deb_repos.pluck(:content_id)
end

Expand Down

0 comments on commit f33bac3

Please sign in to comment.