Merge "Handle patching node /protected value with None"
This commit is contained in:
commit
ceb45d7670
|
@ -1988,6 +1988,9 @@ class NodesController(rest.RestController):
|
||||||
# of just before saving so we calculate correctly.
|
# of just before saving so we calculate correctly.
|
||||||
if field == 'conductor_group':
|
if field == 'conductor_group':
|
||||||
patch_val = patch_val.lower()
|
patch_val = patch_val.lower()
|
||||||
|
# Node object protected field is not nullable
|
||||||
|
if field == 'protected' and patch_val is None:
|
||||||
|
patch_val = False
|
||||||
if rpc_node[field] != patch_val:
|
if rpc_node[field] != patch_val:
|
||||||
rpc_node[field] = patch_val
|
rpc_node[field] = patch_val
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,5 @@
|
||||||
|
---
|
||||||
|
fixes:
|
||||||
|
- |
|
||||||
|
Fixes HTTP 500 when trying to unset the ``protected`` attribute via
|
||||||
|
the CLI.
|
Loading…
Reference in New Issue