1 new commit in galaxy-central: https://bitbucket.org/galaxy/galaxy-central/commits/4c58aa19a3d7/ Changeset: 4c58aa19a3d7 Branch: stable User: davebgx Date: 2014-06-11 22:30:07 Summary: Fix server error when importing a capsule. Affected #: 1 file diff -r 0af48b3c8f33fbe0f05e775f98a14761804c7ac5 -r 4c58aa19a3d7ad94747d5b4dcfd031bebb37a35f lib/tool_shed/util/import_util.py --- a/lib/tool_shed/util/import_util.py +++ b/lib/tool_shed/util/import_util.py @@ -30,26 +30,27 @@ name, owner = name_owner if not ok: repository = suc.get_repository_by_name_and_owner( trans.app, name, owner ) - # Do not allow the repository to be automatically installed if population resulted in errors. - tip_changeset_revision = repository.tip( trans.app ) - repository_metadata = suc.get_repository_metadata_by_changeset_revision( trans, - trans.security.encode_id( repository.id ), - tip_changeset_revision ) - if repository_metadata: - if repository_metadata.downloadable: - repository_metadata.downloadable = False - trans.sa_session.add( repository_metadata ) - if not flush: - flush = True - # Do not allow dependent repository revisions to be automatically installed if population - # resulted in errors. - dependent_downloadable_revisions = suc.get_dependent_downloadable_revisions( trans, repository_metadata ) - for dependent_downloadable_revision in dependent_downloadable_revisions: - if dependent_downloadable_revision.downloadable: - dependent_downloadable_revision.downloadable = False - trans.sa_session.add( dependent_downloadable_revision ) + if repository is not None: + # Do not allow the repository to be automatically installed if population resulted in errors. + tip_changeset_revision = repository.tip( trans.app ) + repository_metadata = suc.get_repository_metadata_by_changeset_revision( trans.app, + trans.security.encode_id( repository.id ), + tip_changeset_revision ) + if repository_metadata: + if repository_metadata.downloadable: + repository_metadata.downloadable = False + trans.sa_session.add( repository_metadata ) if not flush: flush = True + # Do not allow dependent repository revisions to be automatically installed if population + # resulted in errors. + dependent_downloadable_revisions = suc.get_dependent_downloadable_revisions( trans, repository_metadata ) + for dependent_downloadable_revision in dependent_downloadable_revisions: + if dependent_downloadable_revision.downloadable: + dependent_downloadable_revision.downloadable = False + trans.sa_session.add( dependent_downloadable_revision ) + if not flush: + flush = True if flush: trans.sa_session.flush() 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.