Skip to content
Snippets Groups Projects
Commit dc5fcd71 authored by Alexander Heidelbach's avatar Alexander Heidelbach
Browse files

Adjust dict method to match listed parameters

parent 5a18044a
Branches
No related tags found
No related merge requests found
......@@ -211,9 +211,23 @@ class Model(BaseModel):
# get update parameter from model
parameter = {} # type: Dict[str, Dict[str, Any]]
for parametername, values in submodelparameter["parameter"].items():
parameter.update(
{parametername: self.parameters[values["name"]].parameter_info_dict}
)
if not isinstance(values, list):
parameter.update(
{
parametername: self.parameters[
values["name"]
].parameter_info_dict
}
)
else:
parameter.update(
{
parametername: [
self.parameters[value["name"]].parameter_info_dict
for value in values
]
}
)
submodelparameter.pop("parameter")
submodelparameter.update({"parameter": parameter})
modelparameter.update({submodelname: submodelparameter})
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment