Consider the discussion in RPM issue pulp/pulp_rpm#4554
Distributions have the same problem, with ContentGuards. If I delete a CG, suddenly every Distribution protected by it becomes a public Distribution. I believe that the same argument being made for 4554 applies here - we should put the onus on the user to take action to "detach" CGs before deletion, rather than doing it "to" them.
See https://github.com/pulp/pulpcore/blob/main/pulpcore/app/models/publication.py#L652 for the line we'd need to change
Consider the discussion in RPM issue pulp/pulp_rpm#4554
Distributions have the same problem, with ContentGuards. If I delete a CG, suddenly every Distribution protected by it becomes a public Distribution. I believe that the same argument being made for 4554 applies here - we should put the onus on the user to take action to "detach" CGs before deletion, rather than doing it "to" them.
See https://github.com/pulp/pulpcore/blob/main/pulpcore/app/models/publication.py#L652 for the line we'd need to change