Unverified Commit 84a053d9 authored by mvdbeek's avatar mvdbeek
Browse files

Fix default when statement evaluation

One can either do `${return inputs.when}` or the shorter
`$(inputs.when)`, not `${inputs.when}`. Fixes https://github.com/galaxyproject/galaxy/issues/16331
parent 1d4460a0
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -18,7 +18,7 @@ function onSkipBoolean(value: boolean) {
    if (props.step.when && value === false) {
        emit("onUpdateStep", { ...props.step, when: undefined });
    } else if (value === true && !props.step.when) {
        const when = "${inputs.when}";
        const when = "$(inputs.when)";
        const newStep = {
            ...props.step,
            when,
+3 −0
Original line number Diff line number Diff line
@@ -204,6 +204,9 @@ def evaluate_value_from_expressions(progress, step, execution_state, extra_step_
            step_state[key] = to_cwl(value)

    if when_expression is not None:
        if when_expression == "${inputs.when}":
            # Fallback for workflows defined on 23.0
            when_expression = "$(inputs.when)"
        try:
            as_cwl_value = do_eval(
                when_expression,