Skip to content

Commit

Permalink
When exporting a workflow, include owner's annotation if the exportin…
Browse files Browse the repository at this point in the history
…g user doesn't have an overriding one.
  • Loading branch information
dannon committed Oct 26, 2023
1 parent 4fcf3b5 commit 29b6eee
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion lib/galaxy/managers/workflows.py
Original file line number Diff line number Diff line change
Expand Up @@ -1337,7 +1337,12 @@ def _workflow_to_dict_export(self, trans, stored=None, workflow=None, internal=F
tag_str = ""
if stored is not None:
if stored.id:
annotation_str = self.get_item_annotation_str(trans.sa_session, trans.user, stored) or ""
# if the active user doesn't have an annotation on the workflow, default to the owner's annotation.
annotation_str = (
self.get_item_annotation_str(trans.sa_session, trans.user, stored)
or self.get_item_annotation_str(trans.sa_session, stored.user, stored)
or ""
)
tag_str = stored.make_tag_string_list()
else:
# dry run with flushed workflow objects, just use the annotation
Expand Down

0 comments on commit 29b6eee

Please sign in to comment.