From ace28c6e8520dc37bf746ecbfa9b01eb5013d3b7 Mon Sep 17 00:00:00 2001 From: Chris Roberts Date: Wed, 26 Jun 2024 11:47:07 -0400 Subject: [PATCH] Fixes #37598 - Fix missing kwargs on repo enable for ISS --- .../katello/repository_set/enable_repository.rb | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/app/lib/actions/katello/repository_set/enable_repository.rb b/app/lib/actions/katello/repository_set/enable_repository.rb index e8d6c52c711..c631699d23a 100644 --- a/app/lib/actions/katello/repository_set/enable_repository.rb +++ b/app/lib/actions/katello/repository_set/enable_repository.rb @@ -6,8 +6,7 @@ def humanized_name _("Enable") end - def plan(product, content, substitutions, override_url: nil, - override_arch: nil) + def plan(product, content, substitutions, opts = {}) mapper = ::Katello::Candlepin::RepositoryMapper.new(product, content, substitutions) @@ -16,10 +15,10 @@ def plan(product, content, substitutions, override_url: nil, fail ::Katello::Errors::ConflictException, _("The repository is already enabled") end repository = mapper.build_repository - repository.root.arch = override_arch if override_arch.present? - if override_url - repository.root.url = override_url - repository.root.download_policy = ::Katello::RootRepository::DOWNLOAD_IMMEDIATE if URI(override_url).scheme == 'file' + repository.root.arch = opts[:override_arch] if opts[:override_arch].present? + if opts[:override_url] + repository.root.url = opts[:override_url] + repository.root.download_policy = ::Katello::RootRepository::DOWNLOAD_IMMEDIATE if URI(opts[:override_url]).scheme == 'file' end plan_action(Repository::Create, repository, clone: false) action_subject(repository)