Issue #7431
closed
Removing distribution tree cause error on repository version
Status:
CLOSED - CURRENTRELEASE
Description
How to reproduce:
- sync repository with dist tree e.g. fixtures[0] (got the repo_version and added dist_tree)
- remove dist_tree
- look (e.g. http GET) for repo version
AttributeError at /pulp/api/v3/repositories/rpm/rpm/6c56dc14-63f5-4ee1-ac1f-a542add7061a/versions/1/
'NoneType' object has no attribute 'cast'
[0] https://fixtures.pulpproject.org/rpm-distribution-tree/
- Triaged changed from No to Yes
- Sprint set to Sprint 80
- Status changed from NEW to ASSIGNED
- Assignee set to ppicka
- Sprint changed from Sprint 80 to Sprint 81
I'm not sure about the use case for pulp_rpm, but I believe it needs a fix at pulpcore side, we cannot call cast without assuring we have an object
That is true, but in the time it should be casted, pulp assume content is there and it should. We should not allow delete content when it is used in repository.
- Sprint changed from Sprint 81 to Sprint 82
- Status changed from ASSIGNED to POST
- Sprint changed from Sprint 82 to Sprint 83
- Status changed from POST to MODIFIED
- Sprint/Milestone set to 3.8.0
- Status changed from MODIFIED to CLOSED - CURRENTRELEASE
Also available in: Atom
PDF
Comps and disttree removal
User should not be able to remove distribution trees and comps if they are used in repository. If they are not in repo they will be removed with orphan cleanup as other content.
closes: #7431 https://pulp.plan.io/issues/7431