Unverified Commit ed8dc4b8 authored by mvdbeek's avatar mvdbeek
Browse files

Fix dropped when_expression on workflow/tool_upgrade

parent 5050ccde
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -531,6 +531,9 @@ class WorkflowRefactorExecutor:
                if upgrade_input["name"] == input_name:
                    matching_input = upgrade_input
                    break
                elif step.when_expression and f"inputs.{input_name}" in step.when_expression:
                    # TODO: eventually track step inputs more formally
                    matching_input = upgrade_input

            # In the future check parameter type, format, mapping status...
            if matching_input is None:
+3 −1
Original line number Diff line number Diff line
@@ -548,9 +548,11 @@ steps:
  the_step:
    tool_id: multiple_versions
    tool_version: '0.1'
    in:
      when: the_bool
    state:
      inttest: 0
    when: $inputs.the_bool
    when: $(inputs.when)
"""
        )
        assert self._latest_workflow.step_by_label("the_step").tool_version == "0.1"