Commit f7edaabf authored by Ahmed Awan's avatar Ahmed Awan
Browse files

[24.1] Fix `input_step_parameters` missing vals without label

`input_step_parameters` that did not have labels (label=None) were being excluded in the `WorkflowInvocation.to_dict()` result.

This therefore sets the label to `n: Unnamed parameter` for null labels.

Fixes https://github.com/galaxyproject/galaxy/issues/18366
parent 2b3a8256
Loading
Loading
Loading
Loading
+6 −1
Original line number Diff line number Diff line
@@ -74,7 +74,7 @@
                                </details>
                                <ParameterStep
                                    v-else-if="workflowStepType == 'parameter_input'"
                                    :parameters="[invocation.input_step_parameters[stepDetails.workflow_step_label]]" />
                                    :parameters="[getParamInput(stepDetails)]" />
                                <GenericHistoryItem
                                    v-else-if="
                                        isDataStep &&
@@ -209,6 +209,11 @@ export default {
                this.fetchWorkflowForInstanceId(this.workflowStep.workflow_id);
            }
        },
        getParamInput(stepDetails) {
            return Object.values(this.invocation.input_step_parameters).find(
                (param) => param.workflow_step_id === stepDetails.workflow_step_id
            );
        },
        showJob(id) {
            this.$emit("show-job", id);
        },
+1 −1
Original line number Diff line number Diff line
@@ -8923,7 +8923,7 @@ class WorkflowInvocation(Base, UsesCreateAndUpdateTime, Dictifiable, Serializabl
            for input_step_parameter in self.input_step_parameters:
                label = input_step_parameter.workflow_step.label
                if not label:
                    continue
                    label = f"{input_step_parameter.workflow_step.order_index + 1}: Unnamed parameter"
                input_parameters[label] = {
                    "parameter_value": input_step_parameter.parameter_value,
                    "label": label,