Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
record
workbench4record
Commits
de794dd9
Unverified
Commit
de794dd9
authored
Sep 29, 2018
by
Dannon
Committed by
GitHub
Sep 29, 2018
Browse files
Merge pull request #6774 from mvdbeek/fix_old_wf_name
[18.05] Update name of Workflow when updating StoredWorkflow name
parents
9bc37c03
364e7e1f
Changes
1
Hide whitespace changes
Inline
Side-by-side
lib/galaxy/webapps/galaxy/api/workflows.py
View file @
de794dd9
...
...
@@ -481,8 +481,15 @@ class WorkflowsAPIController(BaseAPIController, UsesStoredWorkflowMixin, UsesAnn
workflow_dict
=
payload
.
get
(
'workflow'
)
or
payload
if
workflow_dict
:
new_workflow_name
=
workflow_dict
.
get
(
'name'
)
or
workflow_dict
.
get
(
'name'
)
if
new_workflow_name
:
stored_workflow
.
name
=
sanitize_html
(
new_workflow_name
)
if
new_workflow_name
and
new_workflow_name
!=
stored_workflow
.
name
:
sanitized_name
=
sanitize_html
(
new_workflow_name
)
workflow
=
stored_workflow
.
latest_workflow
.
copy
()
workflow
.
stored_workflow
=
stored_workflow
workflow
.
name
=
sanitized_name
stored_workflow
.
name
=
sanitized_name
stored_workflow
.
latest_workflow
=
workflow
trans
.
sa_session
.
add
(
workflow
,
stored_workflow
)
trans
.
sa_session
.
flush
()
if
'annotation'
in
workflow_dict
:
newAnnotation
=
sanitize_html
(
workflow_dict
[
'annotation'
])
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment