Merge "Refactor the format_validate_parameter fuction to reduce complexity"
This commit is contained in:
commit
db3b5fcb7c
@ -524,6 +524,12 @@ def format_validate_parameter(param):
|
||||
if param.user_value:
|
||||
res[rpc_api.PARAM_VALUE] = param.user_value
|
||||
|
||||
_build_parameter_constraints(res, param)
|
||||
|
||||
return res
|
||||
|
||||
|
||||
def _build_parameter_constraints(res, param):
|
||||
constraint_description = []
|
||||
|
||||
# build constraints
|
||||
@ -565,8 +571,6 @@ def format_validate_parameter(param):
|
||||
res[rpc_api.PARAM_CONSTRAINT_DESCRIPTION] = " ".join(
|
||||
constraint_description)
|
||||
|
||||
return res
|
||||
|
||||
|
||||
def format_software_config(sc, detail=True, include_project=False):
|
||||
if sc is None:
|
||||
|
Loading…
x
Reference in New Issue
Block a user