From fd226aad07d6f640ac3fa13fab7947424bf647e2 Mon Sep 17 00:00:00 2001 From: John Chilton Date: Wed, 11 Jun 2014 12:37:24 -0500 Subject: [PATCH 1/2] Modify url_for in history_contents.py. No clue why - but this randomly fails on main. Will keep looking into it - but it wasn't really giving the pretty URL I wanted anyway (though it was working and this still works due to backward compatbility on this route). --- lib/galaxy/webapps/galaxy/api/history_contents.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/galaxy/webapps/galaxy/api/history_contents.py b/lib/galaxy/webapps/galaxy/api/history_contents.py index d1d90d2badb..dc507d1a569 100644 --- a/lib/galaxy/webapps/galaxy/api/history_contents.py +++ b/lib/galaxy/webapps/galaxy/api/history_contents.py @@ -143,7 +143,7 @@ class HistoryContentsController( BaseAPIController, UsesHistoryDatasetAssociatio 'purged': hda.purged, 'hid' : hda.hid, 'history_content_type' : hda.history_content_type, - 'url' : url_for( 'history_content', history_id=encoded_history_id, id=encoded_id, type="dataset" ), + 'url' : url_for( 'history_content', history_id=encoded_history_id, id=encoded_id ), } def __collection_dict( self, trans, dataset_collection_instance, view="collection" ): From a8c2a879f0069169d3ebd8317de6c4f49419ecfb Mon Sep 17 00:00:00 2001 From: Dannon Baker Date: Wed, 11 Jun 2014 11:39:21 -0400 Subject: [PATCH 2/2] Correct tools handling of tool.handle_input -- this doesn't always return a successful job. --- lib/galaxy/webapps/galaxy/api/tools.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/galaxy/webapps/galaxy/api/tools.py b/lib/galaxy/webapps/galaxy/api/tools.py index 7382e893268..92756550dea 100644 --- a/lib/galaxy/webapps/galaxy/api/tools.py +++ b/lib/galaxy/webapps/galaxy/api/tools.py @@ -156,7 +156,7 @@ class ToolsController( BaseAPIController, UsesVisualizationMixin, UsesHistoryMix output_dict[ 'output_name' ] = output_name outputs.append( trans.security.encode_dict_ids( output_dict ) ) - for job in vars[ 'jobs' ]: + for job in vars.get('jobs', []): rval[ 'jobs' ].append( self.encode_all_ids( trans, job.to_dict( view='collection' ), recursive=True ) ) for output_name, collection_instance in vars.get( 'implicit_collections', {} ).iteritems():