Skip to content

Commit

Permalink
Fixes #36504 - use assign_single_environment in bulk action (Katello#…
Browse files Browse the repository at this point in the history
…10615)

(cherry picked from commit ccd234a)
  • Loading branch information
jeremylenz authored and wbclark committed Sep 6, 2023
1 parent f1b299e commit b473fc8
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 b473fc8

Please sign in to comment.