Commit 53f35b35 authored by Jerome Mariette's avatar Jerome Mariette
Browse files

order sub parameters

parent bb9d0ef8
......@@ -291,7 +291,7 @@ class Workflow(threading.Thread):
if cparam not in param_order: param_order.append(cparam)
for param_name in param_order:
sub_params, current_params, sub_objs = {}, {}, []
sub_params, current_params, sub_objs, sub_order = {}, {}, [], []
for param in params[param_name]:
sub_params_values = param.split(".")
if len(sub_params_values) == 2:
......@@ -299,9 +299,10 @@ class Workflow(threading.Thread):
sub_params[sub_params_values[0]] = {sub_params_values[1]: params[param_name][param]}
else:
sub_params[sub_params_values[0]][sub_params_values[1]] = params[param_name][param]
sub_order.append(sub_params_values[0])
else:
current_params[param] = params[param_name][param]
for sub_param in sub_params:
for sub_param in sorted(sub_params.keys()):
sub_objs.append(Parameter(**sub_params[sub_param]))
current_params["sub_parameters"] = sub_objs
oparam = Parameter(**current_params)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment