Skip to content

Commit

Permalink
Merge pull request #15343 from mvdbeek/workflow_mako_fix
Browse files Browse the repository at this point in the history
[22.05] Fix workflow mako rendering
  • Loading branch information
dannon authored Jan 20, 2023
2 parents e3e61fb + 1b6fd88 commit 6acbf8d
Showing 1 changed file with 20 additions and 11 deletions.
31 changes: 20 additions & 11 deletions lib/galaxy/managers/workflows.py
Original file line number Diff line number Diff line change
Expand Up @@ -990,13 +990,16 @@ def do_inputs(inputs, values, prefix, step, other_values=None):
nested_input_dict = {}
index = repeat_values[i]["__index__"]
nested_input_dict["title"] = "%i. %s" % (i + 1, input.title)
nested_input_dict["inputs"] = do_inputs(
input.inputs,
repeat_values[i],
f"{prefix + input.name}_{str(index)}|",
step,
other_values,
)
try:
nested_input_dict["inputs"] = do_inputs(
input.inputs,
repeat_values[i],
f"{prefix + input.name}_{str(index)}|",
step,
other_values,
)
except KeyError:
continue
nested_input_dicts.append(nested_input_dict)
input_dict["inputs"] = nested_input_dicts
elif input.type == "conditional":
Expand All @@ -1006,14 +1009,20 @@ def do_inputs(inputs, values, prefix, step, other_values=None):
row_for_param(
input_dict, input.test_param, group_values[input.test_param.name], other_values, prefix, step
)
input_dict["inputs"] = do_inputs(
input.cases[current_case].inputs, group_values, new_prefix, step, other_values
)
try:
input_dict["inputs"] = do_inputs(
input.cases[current_case].inputs, group_values, new_prefix, step, other_values
)
except KeyError:
continue
elif input.type == "section":
new_prefix = f"{prefix + input.name}|"
group_values = values[input.name]
input_dict["title"] = input.title
input_dict["inputs"] = do_inputs(input.inputs, group_values, new_prefix, step, other_values)
try:
input_dict["inputs"] = do_inputs(input.inputs, group_values, new_prefix, step, other_values)
except KeyError:
continue
else:
row_for_param(input_dict, input, values[input.name], other_values, prefix, step)
input_dicts.append(input_dict)
Expand Down

0 comments on commit 6acbf8d

Please sign in to comment.