[PR #15705] [CLOSED] #15548 - False Positive Related Object in Custom Fields #14652

Closed
opened 2025-12-29 23:25:45 +01:00 by adam · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/netbox-community/netbox/pull/15705
Author: @Julio-Oliveira-Encora
Created: 4/11/2024
Status: Closed

Base: developHead: 15548-false_positive_related_object_in_custom_fields


📝 Commits (1)

  • 17bab84 Added CustomObjectDeleteView to avoid show message about dependent objects.

📊 Changes

2 files changed (+39 additions, -1 deletions)

View changed files

📝 netbox/extras/views.py (+1 -1)
📝 netbox/netbox/views/generic/object_views.py (+38 -0)

📄 Description

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.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/netbox-community/netbox/pull/15705 **Author:** [@Julio-Oliveira-Encora](https://github.com/Julio-Oliveira-Encora) **Created:** 4/11/2024 **Status:** ❌ Closed **Base:** `develop` ← **Head:** `15548-false_positive_related_object_in_custom_fields` --- ### 📝 Commits (1) - [`17bab84`](https://github.com/netbox-community/netbox/commit/17bab843bc9558195bdc039eaf14be628e37fda9) Added CustomObjectDeleteView to avoid show message about dependent objects. ### 📊 Changes **2 files changed** (+39 additions, -1 deletions) <details> <summary>View changed files</summary> 📝 `netbox/extras/views.py` (+1 -1) 📝 `netbox/netbox/views/generic/object_views.py` (+38 -0) </details> ### 📄 Description ### 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. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
adam added the pull-request label 2025-12-29 23:25:45 +01:00
adam closed this issue 2025-12-29 23:25:45 +01:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#14652