Skip to content

Commit

Permalink
Change instance that will be passed to sa_session via add in service …
Browse files Browse the repository at this point in the history
…method of update operation
  • Loading branch information
heisner-tillman committed May 11, 2024
1 parent 08519bb commit 90f8c92
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion lib/galaxy/webapps/galaxy/services/workflows.py
Original file line number Diff line number Diff line change
Expand Up @@ -386,7 +386,12 @@ def update_workflow(
workflow.name = sanitized_name
stored_workflow.name = sanitized_name
stored_workflow.latest_workflow = workflow
trans.sa_session.add(workflow, stored_workflow)

# TODO MyPy complains about this line, but it seems to be working
# trans.sa_session.add(workflow, stored_workflow)
# TODO: This also appears to work. Is it better?
trans.sa_session.add(workflow)

require_flush = True

if "hidden" in workflow_dict and stored_workflow.hidden != workflow_dict["hidden"]:
Expand Down

0 comments on commit 90f8c92

Please sign in to comment.