mirror of
https://github.com/galaxyproject/galaxy.git
synced 2026-09-24 16:30:27 +08:00
Only set workflow tags if they are include in workflow update payload
We accept different kinds of payloads here. The summary payload as sent by the workflow overview page includes a tags key, while the workflow payload sent by the workflow editor only includes the steps (tag updates are sent through a different endpoint), so anytime a workflow is saved in the workflow editor we would fallback to an empty list as the new tags, effectively removing all tags. Fixes https://github.com/galaxyproject/galaxy/issues/6888.
This commit is contained in:
@@ -552,7 +552,8 @@ class WorkflowsAPIController(BaseAPIController, UsesStoredWorkflowMixin, UsesAnn
|
||||
if (trans.security.decode_id(id) in entries):
|
||||
trans.get_user().stored_workflow_menu_entries.remove(entries[trans.security.decode_id(id)])
|
||||
# set tags
|
||||
trans.app.tag_handler.set_tags_from_list(user=trans.user, item=stored_workflow, new_tags_list=workflow_dict.get('tags', []))
|
||||
if 'tags' in workflow_dict:
|
||||
trans.app.tag_handler.set_tags_from_list(user=trans.user, item=stored_workflow, new_tags_list=workflow_dict['tags'])
|
||||
|
||||
if 'steps' in workflow_dict:
|
||||
try:
|
||||
|
||||
Reference in New Issue
Block a user