Unverified Commit 6acbf8dd authored by Dannon's avatar Dannon Committed by GitHub
Browse files

Merge pull request #15343 from mvdbeek/workflow_mako_fix

[22.05] Fix workflow mako rendering
parents e3e61fb7 1b6fd884
Loading
Loading
Loading
Loading
+20 −11
Original line number Diff line number Diff line
@@ -990,6 +990,7 @@ class WorkflowContentsManager(UsesAnnotations):
                            nested_input_dict = {}
                            index = repeat_values[i]["__index__"]
                            nested_input_dict["title"] = "%i. %s" % (i + 1, input.title)
                            try:
                                nested_input_dict["inputs"] = do_inputs(
                                    input.inputs,
                                    repeat_values[i],
@@ -997,6 +998,8 @@ class WorkflowContentsManager(UsesAnnotations):
                                    step,
                                    other_values,
                                )
                            except KeyError:
                                continue
                            nested_input_dicts.append(nested_input_dict)
                        input_dict["inputs"] = nested_input_dicts
                elif input.type == "conditional":
@@ -1006,14 +1009,20 @@ class WorkflowContentsManager(UsesAnnotations):
                    row_for_param(
                        input_dict, input.test_param, group_values[input.test_param.name], other_values, prefix, step
                    )
                    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
                    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)