-
Notifications
You must be signed in to change notification settings - Fork 2.9k
Closed
Labels
severity: mediumResults in substantial degraded or broken functionality for specfic workflowsResults in substantial degraded or broken functionality for specfic workflowsstatus: acceptedThis issue has been accepted for implementationThis issue has been accepted for implementationtype: bugA confirmed report of unexpected behavior in the applicationA confirmed report of unexpected behavior in the application
Description
Deployment Type
Self-hosted
Triage priority
N/A
NetBox Version
v4.1.11
Python Version
3.12
Steps to Reproduce
- Create a custom
Protection_Rulein the configuration.py. Example:
from extras.validators import CustomValidator
# Prevent IP addresses from being deleted by a cascading delete
class IpAddressProtectionRule(CustomValidator):
def validate(self, instance, request):
if hasattr(instance, 'primary_ip') and instance.primary_ip is not None:
self.fail('This instance has a related IP address(es).')
PROTECTION_RULES = {
'dcim.device': (
IpAddressProtectionRule(),
),
}
- Restart NetBox services
- Navigate to Admin -> System
Expected Behavior
The system detail page is returned.
Observed Behavior
Metadata
Metadata
Assignees
Labels
severity: mediumResults in substantial degraded or broken functionality for specfic workflowsResults in substantial degraded or broken functionality for specfic workflowsstatus: acceptedThis issue has been accepted for implementationThis issue has been accepted for implementationtype: bugA confirmed report of unexpected behavior in the applicationA confirmed report of unexpected behavior in the application
