Skip to content

Commit

Permalink
Fixes #37598 - Fix missing kwargs on repo enable for ISS
Browse files Browse the repository at this point in the history
  • Loading branch information
chris1984 authored and ianballou committed Jul 1, 2024
1 parent 99f5cdb commit ace28c6
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions app/lib/actions/katello/repository_set/enable_repository.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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)
Expand Down

0 comments on commit ace28c6

Please sign in to comment.