-
Notifications
You must be signed in to change notification settings - Fork 2.6k
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
Adding Interface vie API wont accept null values for not required fields after update to 3.5.1 #12533
Comments
Hi @LoSaMe what happens if you simply omit the fields in your |
Thank you for the fast answer @jsenecal . Omitting all null values resolved the problem. |
It seems to me that this is not the final solution to this problem. |
Leaving out values isn't a solution for people that don't directly control what's sent in the HTTP request, like users of pynetbox. |
I don't know if this is a bug. mode does not take null, it does take "" however. Likely some of the other columns are the same as well. |
I ran into the same issue after upgrading |
NetBox version
v3.5.1
Python version
3.8
Steps to Reproduce
We utilize a custom script to add new devices to NetBox, which collects necessary information and creates corresponding objects via the NetBox API. However, we encountered an issue after upgrading our instance from version 3.4.1 to 3.5.1 (worked before). Below is an example Powershell code that is responsible for creating interfaces.
Same results with a Python script:
Expected Behavior
Add the Interface as defined.
Observed Behavior
The following error occurs when the script attempts to add a interface:
{"wnn": ["This field may not be null.""]}
If a default value for "wwn" such as "0000000000000000" is added to the script, then the script will output:
Adding an interface via GUI is not a problem (only the required fields are filled)
The text was updated successfully, but these errors were encountered: