Skip to content

Commit

Permalink
Merge pull request #19311 from mvdbeek/fix_import_of_previously_delet…
Browse files Browse the repository at this point in the history
…ed_trs_workflow

[24.2] Fix import of previously-deleted TRS workflow
  • Loading branch information
jmchilton authored Dec 12, 2024
2 parents 41ade9f + 69f2c18 commit b2cf660
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/galaxy/managers/workflows.py
Original file line number Diff line number Diff line change
Expand Up @@ -2084,6 +2084,7 @@ def to_json(column, keys: List[str]):
.join(model.Workflow, model.Workflow.id == model.StoredWorkflow.latest_workflow_id)
.filter(
and_(
model.StoredWorkflow.deleted == false(),
to_json(model.Workflow.source_metadata, ["trs_tool_id"]) == trs_id,
to_json(model.Workflow.source_metadata, ["trs_version_id"]) == trs_version,
)
Expand All @@ -2095,7 +2096,7 @@ def to_json(column, keys: List[str]):
)
else:
stmnt = stmnt.filter(model.StoredWorkflow.importable == true())
return sa_session.execute(stmnt).scalar()
return sa_session.execute(stmnt.order_by(model.StoredWorkflow.id.desc()).limit(1)).scalar()


class RefactorRequest(RefactorActions):
Expand Down

0 comments on commit b2cf660

Please sign in to comment.