Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[24.1] Fix loading very old workflows with data inputs #18876

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions lib/galaxy/managers/workflows.py
Original file line number Diff line number Diff line change
Expand Up @@ -1645,7 +1645,7 @@ def _workflow_to_dict_instance(self, trans, stored, workflow, legacy=True):
inputs = {}
for step in workflow.input_steps:
step_type = step.type
step_label = step.label or step.tool_inputs.get("name")
step_label = step.label or step.tool_inputs and step.tool_inputs.get("name")
if step_label:
label = step_label
elif step_type == "data_input":
Expand Down Expand Up @@ -1939,7 +1939,7 @@ def __set_default_label(self, step, module, state):
to the actual `label` attribute which is available for all module types, unique, and mapped to its own database column.
"""
if not module.label and module.type in ["data_input", "data_collection_input"]:
new_state = safe_loads(state)
new_state = safe_loads(state) or {}
default_label = new_state.get("name")
if default_label and util.unicodify(default_label).lower() not in [
"input dataset",
Expand Down
Loading