Skip to content

Commit

Permalink
Fixes #37538 - Check orphaned content facet before CV deletion (Katel…
Browse files Browse the repository at this point in the history
  • Loading branch information
sjha4 authored Jun 13, 2024
1 parent 2d8fe20 commit d39fb36
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions app/models/katello/content_view.rb
Original file line number Diff line number Diff line change
Expand Up @@ -712,6 +712,7 @@ def check_orphaned_content_facets!(environments: [])
end

def check_remove_from_environment!(env)
check_orphaned_content_facets!(environments: [env])
errors = []

dependencies = { hosts: _("hosts"),
Expand All @@ -730,6 +731,7 @@ def check_remove_from_environment!(env)
end

def check_ready_to_destroy!
check_orphaned_content_facets!(environments: self.environments)
errors = []

dependencies = { environments: _("environments"),
Expand Down

0 comments on commit d39fb36

Please sign in to comment.