1 new commit in galaxy-central: https://bitbucket.org/galaxy/galaxy-central/commits/a976a0ceee2b/ Changeset: a976a0ceee2b User: greg Date: 2014-01-13 22:54:40 Summary: Fixes for mapping values in the Galaxy tool shed install methods. Affected #: 1 file diff -r c2f2b62f5435a328eb0e54cbee00ce2fd3f668fc -r a976a0ceee2b9d5a57eb6eaef062d48ebcdff085 lib/galaxy/webapps/galaxy/api/tool_shed_repositories.py --- a/lib/galaxy/webapps/galaxy/api/tool_shed_repositories.py +++ b/lib/galaxy/webapps/galaxy/api/tool_shed_repositories.py @@ -66,8 +66,9 @@ exported_workflows.append( display_dict ) return exported_workflows - def __get_value_mapper( self, trans ): - value_mapper = { 'id' : trans.security.encode_id } + def __get_value_mapper( self, trans, tool_shed_repository ): + value_mapper={ 'id' : trans.security.encode_id( tool_shed_repository.id ), + 'error_message' : tool_shed_repository.error_message or '' } return value_mapper @web.expose_api @@ -142,7 +143,7 @@ for tool_shed_repository in trans.install_model.context.query( trans.app.install_model.ToolShedRepository ) \ .order_by( trans.app.install_model.ToolShedRepository.table.c.name ): tool_shed_repository_dict = \ - tool_shed_repository.to_dict( value_mapper=self.__get_value_mapper( trans ) ) + tool_shed_repository.to_dict( value_mapper=self.__get_value_mapper( trans, tool_shed_repository ) ) tool_shed_repository_dict[ 'url' ] = web.url_for( controller='tool_shed_repositories', action='show', id=trans.security.encode_id( tool_shed_repository.id ) ) @@ -336,7 +337,7 @@ tool_path, install_tool_dependencies, reinstalling=False ) - tool_shed_repository_dict = tool_shed_repository.as_dict( value_mapper=self.__get_value_mapper( trans ) ) + tool_shed_repository_dict = tool_shed_repository.as_dict( value_mapper=self.__get_value_mapper( trans, tool_shed_repository ) ) tool_shed_repository_dict[ 'url' ] = web.url_for( controller='tool_shed_repositories', action='show', id=trans.security.encode_id( tool_shed_repository.id ) ) @@ -471,7 +472,7 @@ repair_dict = repository_util.repair_tool_shed_repository( trans, repository, encoding_util.tool_shed_encode( repo_info_dict ) ) - repository_dict = repository.to_dict( value_mapper=self.__get_value_mapper( trans ) ) + repository_dict = repository.to_dict( value_mapper=self.__get_value_mapper( trans, repository ) ) repository_dict[ 'url' ] = web.url_for( controller='tool_shed_repositories', action='show', id=trans.security.encode_id( repository.id ) ) @@ -538,7 +539,7 @@ if tool_shed_repository is None: log.debug( "Unable to locate tool_shed_repository record for id %s." % ( str( id ) ) ) return {} - tool_shed_repository_dict = tool_shed_repository.as_dict( value_mapper=self.__get_value_mapper( trans ) ) + tool_shed_repository_dict = tool_shed_repository.as_dict( value_mapper=self.__get_value_mapper( trans, tool_shed_repository ) ) tool_shed_repository_dict[ 'url' ] = web.url_for( controller='tool_shed_repositories', action='show', id=trans.security.encode_id( tool_shed_repository.id ) ) Repository URL: https://bitbucket.org/galaxy/galaxy-central/ -- This is a commit notification from bitbucket.org. You are receiving this because you have the service enabled, addressing the recipient of this email.