Skip to content

Commit

Permalink
Fixes #36504 - use assign_single_environment in bulk action (#10615)
Browse files Browse the repository at this point in the history
  • Loading branch information
jeremylenz authored Jun 16, 2023
1 parent 7efc0cb commit ccd234a
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions app/lib/actions/katello/host/update_content_view.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,10 @@ module Host
class UpdateContentView < Actions::EntryAction
def plan(host, content_view_id, lifecycle_environment_id)
if host.content_facet
host.content_facet.content_view = ::Katello::ContentView.find(content_view_id)
host.content_facet.lifecycle_environment = ::Katello::KTEnvironment.find(lifecycle_environment_id)
host.content_facet.assign_single_environment(
content_view_id: content_view_id,
lifecycle_environment_id: lifecycle_environment_id
)
host.update_candlepin_associations
plan_self(:hostname => host.name)
else
Expand Down

0 comments on commit ccd234a

Please sign in to comment.