Fixes client to send 0 for min/max size
Previously, if 0 is passed as the min_size or max_size for a configuration, the Trove client would ignore it and not put it in the dict making up the request body. This changes that code to explicitly check if this value is not None instead of ignoring it if its zero. Co-Authored-By: Craig Vyvial <cp16net@gmail.com> Fixes bug: 1398995 Change-Id: I7f1d196b00a612365576bfb82fbfd35d647588d4
This commit is contained in:
parent
3ba7e9b831
commit
3f124e916c
|
@ -200,9 +200,9 @@ class MgmtConfigurationParameters(configurations.ConfigurationParameters):
|
|||
"data_type": data_type,
|
||||
}
|
||||
}
|
||||
if max_size:
|
||||
if max_size is not None:
|
||||
body["configuration-parameter"]["max_size"] = max_size
|
||||
if min_size:
|
||||
if min_size is not None:
|
||||
body["configuration-parameter"]["min_size"] = min_size
|
||||
|
||||
url = "/mgmt/datastores/versions/%s/parameters" % version
|
||||
|
@ -229,9 +229,9 @@ class MgmtConfigurationParameters(configurations.ConfigurationParameters):
|
|||
"data_type": data_type,
|
||||
}
|
||||
}
|
||||
if max_size:
|
||||
if max_size is not None:
|
||||
body["configuration-parameter"]["max_size"] = max_size
|
||||
if min_size:
|
||||
if min_size is not None:
|
||||
body["configuration-parameter"]["min_size"] = min_size
|
||||
output = {
|
||||
'version': version,
|
||||
|
|
Loading…
Reference in New Issue