-
Notifications
You must be signed in to change notification settings - Fork 2.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
IP-Address creation allows specifying 'dcim.cable' as 'assigned_object_type' #5176
Comments
Not only is this case possible, but you can also set |
The root issue seems to be that The following fields are likely affected:
|
This is likely solved by extending |
This has been addressed in |
Environment
Steps to Reproduce
Expected Behavior
If using pynetbox or sending a Post:
400 Bad Request: {'assigned_object_type': ['Invalid content type: dcim.cable']}
If using nbshell or a script/report:
Observed Behavior
Creation succeeds. The IP address shows a tick in the "Assigned" label.
If this was done using pynetbox, navigating to the IP address view also shows the cable label as its "Assignment". This field is empty otherwise.
Important Notes
The NetBox shell/script/report method allows specifying any invalid content type (provided it can be obtained from ContentTypes) - will save it and never display it to a user.
The API call allows specifying some invalid object types, I have successfully assigned 'virtualiztion.cluster' but not 'extras.tags'.
The only invalid object type Pynetbox allows assigning is 'dcim.cable' for some reason - the cluster type attempt fails properly.
The text was updated successfully, but these errors were encountered: