mirror of
https://github.com/netbox-community/netbox.git
synced 2025-07-22 20:12:00 -06:00
dont include the item being deleted in the list of related items
This commit is contained in:
parent
1063db9470
commit
298a7860b2
@ -341,7 +341,8 @@ class ObjectDeleteView(GetReturnURLMixin, BaseObjectView):
|
||||
nested_objs = []
|
||||
if collector.instances_with_model():
|
||||
for model, instance in collector.instances_with_model():
|
||||
nested_objs.append(f"{model.__name__} - {instance}")
|
||||
if not instance == obj:
|
||||
nested_objs.append(f"{model.__name__} - {instance}")
|
||||
|
||||
|
||||
# If this is an HTMX request, return only the rendered deletion form as modal content
|
||||
|
Loading…
Reference in New Issue
Block a user