1 new commit in galaxy-central: https://bitbucket.org/galaxy/galaxy-central/commits/03f186a98017/ Changeset: 03f186a98017 User: greg Date: 2014-01-17 22:35:05 Summary: Dict url entry changes and improved logging for the Tool Shed api. Affected #: 1 file diff -r 8704a185d43ef02b0dd763a89a9b003df0326d90 -r 03f186a9801738c9cab95275038851ed95922a49 lib/galaxy/webapps/tool_shed/api/repository_revisions.py --- a/lib/galaxy/webapps/tool_shed/api/repository_revisions.py +++ b/lib/galaxy/webapps/tool_shed/api/repository_revisions.py @@ -186,9 +186,9 @@ value_mapper=self.__get_value_mapper( trans ) ) # We have to add the changeset_revision of of the repository dependency. repository_dependency_dict[ 'changeset_revision' ] = changeset_revision - repository_dependency_dict[ 'url' ] = web.url_for( controller='repository_revisions', + repository_dependency_dict[ 'url' ] = web.url_for( controller='repositories', action='show', - id=repository_dependency_repository_metadata_id ) + id=repository_dependency_id ) repository_dependencies_dicts.append( repository_dependency_dict ) return repository_dependencies_dicts @@ -205,11 +205,13 @@ if repository_metadata is None: log.debug( 'Cannot locate repository_metadata with id %s' % str( id ) ) return {} + encoded_repository_id = trans.security.encode_id( repository_metadata.repository_id ) + repository = suc.get_repository_by_id( trans, encoded_repository_id ) repository_metadata_dict = repository_metadata.to_dict( view='element', value_mapper=self.__get_value_mapper( trans ) ) - repository_metadata_dict[ 'url' ] = web.url_for( controller='repository_revisions', + repository_metadata_dict[ 'url' ] = web.url_for( controller='repositories', action='show', - id=trans.security.encode_id( repository_metadata.id ) ) + id=encoded_repository_id ) return repository_metadata_dict @web.expose_api @@ -223,8 +225,11 @@ raise HTTPBadRequest( detail="Missing required parameter 'id'." ) repository_metadata = metadata_util.get_repository_metadata_by_id( trans, repository_metadata_id ) if repository_metadata is None: - log.debug( 'Cannot locate repository_metadata with id %s' % str( repository_metadata_id ) ) + decoded_repository_metadata_id = trans.security.decode_id( repository_metadata_id ) + log.debug( 'Cannot locate repository_metadata with id %s' % str( decoded_repository_metadata_id ) ) return {} + else: + decoded_repository_metadata_id = repository_metadata.id flush_needed = False for key, new_value in payload.items(): if key == 'time_last_tested': @@ -239,6 +244,8 @@ setattr( repository_metadata, key, new_value ) flush_needed = True if flush_needed: + log.debug( 'Updating repository_metadata record with id %s and changeset_revision %s.' % \ + ( str( decoded_repository_metadata_id ), str( repository_metadata.changeset_revision ) ) ) trans.sa_session.add( repository_metadata ) trans.sa_session.flush() trans.sa_session.refresh( repository_metadata ) @@ -246,5 +253,5 @@ value_mapper=self.__get_value_mapper( trans ) ) repository_metadata_dict[ 'url' ] = web.url_for( controller='repository_revisions', action='show', - id=trans.security.encode_id( repository_metadata.id ) ) + id=repository_metadata_id ) return repository_metadata_dict 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.