Skip to content

Commit

Permalink
Fix workflow license & image for invocations.
Browse files Browse the repository at this point in the history
Was previously only tested on pages. Extra magic is needed to convert them for invocations.
  • Loading branch information
jmchilton committed Nov 17, 2023
1 parent 7e515a6 commit 3a143d6
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions lib/galaxy/managers/markdown_util.py
Original file line number Diff line number Diff line change
Expand Up @@ -873,11 +873,18 @@ def _section_remap(container, line):
return section_markdown, True

def _remap(container, line):
if container == "workflow_display":
for workflow_instance_directive in ["workflow_display", "workflow_image"]:
if container == workflow_instance_directive:
stored_workflow_id = invocation.workflow.stored_workflow.id
workflow_version = invocation.workflow.version
return (
f"{workflow_instance_directive}(workflow_id={stored_workflow_id},workflow_checkpoint={workflow_version})\n",
False,
)
if container == "workflow_license":
stored_workflow_id = invocation.workflow.stored_workflow.id
workflow_version = invocation.workflow.version
return (
f"workflow_display(workflow_id={stored_workflow_id},workflow_checkpoint={workflow_version})\n",
f"workflow_license(workflow_id={stored_workflow_id})\n",
False,
)
if container == "history_link":
Expand Down

0 comments on commit 3a143d6

Please sign in to comment.