-
Notifications
You must be signed in to change notification settings - Fork 2.7k
Unable to nullify choice fields via the API #4083
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
Comments
Omit the
|
Thanks for looking and for the suggestions. I know netboxdemo.com is unsanctioned, but here's a quick reproducible illustration of the problem in that environment when following your suggestions. setting
omitting
|
Sorry, I had pasted the wrong command in my previous comment. I've corrected it to omit the |
No worries, thanks. I'm sorry for not explaining myself more clearly, but omitting the Anyway, I'm happy to work around this and it's definitely possible I'm missing something, but let me know if you have other thoughts or if I can provide any other information. Thanks again for your time |
Sorry, this took a while to track down. I wasn't able to replicate the error earlier because the device that I was testing against did not have a rack face already assigned, so the validation check was not being triggered. |
…hoices Fixes #4083: Permit nullifying applicable choice fields via API requests
Great, thanks a bunch! |
Environment
To fully unrack a device, you must blank out its rack, position, and face values.
The
face
field has a non-null constraint and has an API validator that requires its value to be eitherfront
orrear
, so it's not possible to blank out the value through the API which prevents the device from being removed from the rack.Steps to Reproduce
Expected Behavior
The device to be unracked
Observed Behavior
If passing
null
for the face value, the django non-null constraint is hit.If patching just the
rack
andposition
values without touching theface
, theCannot select a rack face without assigning a rack.
validator is hit.The text was updated successfully, but these errors were encountered: