Skip to content

Commit

Permalink
Don't cast tool_version to string if tool_version is None-type
Browse files Browse the repository at this point in the history
If a version is not specifically requested a wrong version (`None` cast to
`'None'`) of a tool will be loaded in the workflow editor instead of the
latest version.

That should address @martenson's remark in
galaxyproject#4373 (comment)
(and maybe also
galaxyproject#557 (comment)).
  • Loading branch information
mvdbeek committed Aug 13, 2017
1 parent 10efd7f commit d0b06a3
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion lib/galaxy/workflow/modules.py
Original file line number Diff line number Diff line change
Expand Up @@ -560,7 +560,9 @@ def from_dict( Class, trans, d, exact_tools=False, **kwds ):
tool_id = d.get( 'content_id' ) or d.get( 'tool_id' )
if tool_id is None:
raise exceptions.RequestParameterInvalidException( "No tool id could be located for step [%s]." % d )
tool_version = str( d.get( 'tool_version' ) )
tool_version = d.get( 'tool_version' )
if tool_version:
tool_version = str(tool_version)
module = super( ToolModule, Class ).from_dict( trans, d, tool_id=tool_id, tool_version=tool_version, exact_tools=exact_tools )
module.post_job_actions = d.get( 'post_job_actions', {} )
module.workflow_outputs = d.get( 'workflow_outputs', [] )
Expand Down

0 comments on commit d0b06a3

Please sign in to comment.