app/lib/actions/katello/repository/update.rb in katello-3.6.0.1.rc2 vs app/lib/actions/katello/repository/update.rb in katello-3.7.0.rc1
- old
+ new
@@ -1,10 +1,11 @@
module Actions
module Katello
module Repository
class Update < Actions::EntryAction
middleware.use Actions::Middleware::KeepCurrentUser
+ # rubocop:disable MethodLength
def plan(repository, repo_params)
action_subject repository
repository = repository.reload
repo_params[:url] = nil if repo_params[:url] == ''
repository.update_attributes!(repo_params)
@@ -35,13 +36,15 @@
if SETTINGS[:katello][:use_pulp] && repository.pulp_update_needed?
plan_action(::Actions::Pulp::Repository::Refresh, repository)
end
if SETTINGS[:katello][:use_pulp] && (repository.previous_changes.key?('unprotected') ||
- repository.previous_changes.key?('checksum_type'))
+ repository.previous_changes.key?('checksum_type') ||
+ repository.previous_changes.key?('container_repository_name'))
plan_self(:repository_id => repository.id)
end
end
+ # rubocop:enable MethodLength
def run
repository = ::Katello::Repository.find(input[:repository_id])
ForemanTasks.async_task(Katello::Repository::MetadataGenerate, repository)
end