commit/galaxy-central: greg: Fix for setting tool shed repository etadata multiple times when nothing in the repository has changed.
1 new changeset in galaxy-central: http://bitbucket.org/galaxy/galaxy-central/changeset/38899d79629b/ changeset: 38899d79629b user: greg date: 2011-07-11 20:48:12 summary: Fix for setting tool shed repository etadata multiple times when nothing in the repository has changed. affected #: 1 file (178 bytes) --- a/lib/galaxy/webapps/community/controllers/common.py Mon Jul 11 14:10:56 2011 -0400 +++ b/lib/galaxy/webapps/community/controllers/common.py Mon Jul 11 14:48:12 2011 -0400 @@ -146,10 +146,13 @@ metadata_dict[ 'tools' ] = [ tool_dict ] except Exception, e: invalid_tool_configs.append( ( name, str( e ) ) ) - repository_metadata = trans.model.RepositoryMetadata( repository.id, repository.tip, metadata_dict ) - trans.sa_session.add( repository_metadata ) - if not flush_needed: - flush_needed = True + if metadata_dict: + # The metadata_dict dictionary will contain items only + # if the repository did not already have metadata set. + repository_metadata = trans.model.RepositoryMetadata( repository.id, repository.tip, metadata_dict ) + trans.sa_session.add( repository_metadata ) + if not flush_needed: + flush_needed = True else: message = "Repository does not include changeset revision '%s'." % str( ctx_str ) status = 'error' 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