diff options
author | Michael DeHaan <mdehaan@redhat.com> | 2009-02-18 11:58:29 -0500 |
---|---|---|
committer | Michael DeHaan <mdehaan@redhat.com> | 2009-02-18 11:58:29 -0500 |
commit | 132926e04490fb1bbce406b042a2574b0c3ed000 (patch) | |
tree | bf34fe1b8c0b49647dbc56f464db73a83a36ee65 /cobbler/collection.py | |
parent | 9e5e1b339950f90ced041b373530e99e721346e6 (diff) | |
download | cobbler-132926e04490fb1bbce406b042a2574b0c3ed000.tar.gz cobbler-132926e04490fb1bbce406b042a2574b0c3ed000.tar.xz cobbler-132926e04490fb1bbce406b042a2574b0c3ed000.zip |
Fix removal of images that have child objects, so that orphan detection and recursive removal works as in the rest of cobbler.
Conflicts:
cobbler/collection_images.py
Diffstat (limited to 'cobbler/collection.py')
-rw-r--r-- | cobbler/collection.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/cobbler/collection.py b/cobbler/collection.py index d6df28ad..3bc15cc7 100644 --- a/cobbler/collection.py +++ b/cobbler/collection.py @@ -319,6 +319,10 @@ class Collection(serializable.Serializable): match = self.api.find_distro(ref.name) elif isinstance(ref, item_repo.Repo): match = self.api.find_repo(ref.name) + elif isinstance(ref, item_image.Image): + match = self.api.find_image(ref.name) + else: + raise CX("internal error, unknown object type") if match: raise CX(_("An object already exists with that name. Try 'edit'?")) |