netbox
netbox copied to clipboard
#15548 - False Positive Related Object in Custom Fields
Fixes: #15548
I created the class CustomObjectDeleteView, which was inherited from ObjectDeleteView, and overwritten the "get" method and its dependent_objects variable. This way, the modal from delete_form.html will not display messages about dependent objects.
Also, I changed the inherited class for CustomFieldDeleteView to use generic.CustomObjectDeleteView.