-
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
NetBox version
v3.5.1
Python version
3.10
Steps to Reproduce
- Set the Custom Validators setting to validate tag requirements
CUSTOM_VALIDATORS = {
"ipam.ipaddress": [{"tags": {"required": True}}],
"dcim.site": [{"tags": {"required": True}}],
"dcim.region": [{"tags": {"required": True}}]
}
- Create a new object defined in the list above with/without tags defined.
(This error is not exclusive to those object types)
Expected Behavior
I expected NetBox to validate if that particular object has tags set.
Observed Behavior
<class 'ValueError'>
IPAddress objects need to have a primary key value before you can access their tags.
Python version: 3.10.6
NetBox version: 3.5.1
I'm not sure if I'm asking too much from the Custom Validators here, or if another method to enforce the existence of Tags is available.
decoupca, gpipito, kuhball, DerInti and konsta21
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