commit/galaxy-central: greg: Two minor but important bug fixes in searching for and displaying tool shed repositories.
1 new changeset in galaxy-central: http://bitbucket.org/galaxy/galaxy-central/changeset/35063fa0b2cb/ changeset: 35063fa0b2cb user: greg date: 2011-09-09 22:05:52 summary: Two minor but important bug fixes in searching for and displaying tool shed repositories. affected #: 2 files (513 bytes) --- a/lib/galaxy/webapps/community/controllers/common.py Fri Sep 09 12:15:27 2011 -0400 +++ b/lib/galaxy/webapps/community/controllers/common.py Fri Sep 09 16:05:52 2011 -0400 @@ -380,7 +380,7 @@ return message, status def get_repository_by_name( trans, name ): """Get a repository from the database via name""" - return trans.sa_session.query( app.model.Repository ).filter_by( name=name ).one() + return trans.sa_session.query( trans.model.Repository ).filter_by( name=name ).one() def get_changectx_for_changeset( trans, repo, changeset_revision, **kwd ): """Retrieve a specified changectx from a repository""" for changeset in repo.changelog: --- a/lib/galaxy/webapps/community/controllers/repository.py Fri Sep 09 12:15:27 2011 -0400 +++ b/lib/galaxy/webapps/community/controllers/repository.py Fri Sep 09 16:05:52 2011 -0400 @@ -241,6 +241,14 @@ # What we've done is rendered the search box for the RepositoryListGrid on the grid.mako # template for the CategoryListGrid. See ~/templates/webapps/community/category/grid.mako. # Since we are searching repositories and not categories, redirect to browse_repositories(). + if 'id' in kwd and 'f-free-text-search' in kwd and kwd[ 'id' ] == kwd[ 'f-free-text-search' ]: + # The value of 'id' has been set to the search string, which is a repository name. + # We'll try to get the desired encoded repository id to pass on. + try: + repository = get_repository_by_name( trans, kwd[ 'id' ] ) + kwd[ 'id' ] = trans.security.encode_id( repository.id ) + except: + pass return self.browse_repositories( trans, **kwd ) if 'operation' in kwd: operation = kwd['operation'].lower() 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.
participants (1)
-
Bitbucket