commit/galaxy-central: greg: Make sure a repository exists before checking its status - thanks to Nicola Soranzo for finding this issue.
1 new commit in galaxy-central: https://bitbucket.org/galaxy/galaxy-central/commits/60be24933d59/ Changeset: 60be24933d59 User: greg Date: 2014-06-27 13:06:48 Summary: Make sure a repository exists before checking its status - thanks to Nicola Soranzo for finding this issue. Affected #: 1 file diff -r 6577911a2230fd33b40031300af6214b52bf3058 -r 60be24933d59806e355d64a5156327021027772d lib/galaxy/webapps/galaxy/controllers/admin_toolshed.py --- a/lib/galaxy/webapps/galaxy/controllers/admin_toolshed.py +++ b/lib/galaxy/webapps/galaxy/controllers/admin_toolshed.py @@ -1268,8 +1268,8 @@ new_kwd = {} if repository_id is not None: repository = suc.get_installed_tool_shed_repository( trans.app, repository_id ) - if repository.is_new: - if repository: + if repository: + if repository.is_new: if kwd.get( 'purge_repository_button', False ): irm = trans.app.installed_repository_manager purge_status, purge_message = irm.purge_repository( repository ) @@ -1283,10 +1283,10 @@ repository=repository ) else: new_kwd[ 'status' ] = 'error' - new_kwd[ 'message' ] = 'Cannot locate the database record for the repository with encoded id %s.' % str( repository_id ) + new_kwd[ 'message' ] = 'Repositories must have a <b>New</b> status in order to be purged.' else: new_kwd[ 'status' ] = 'error' - new_kwd[ 'message' ] = 'Repositories must have a <b>New</b> status in order to be purged.' + new_kwd[ 'message' ] = 'Cannot locate the database record for the repository with encoded id %s.' % str( repository_id ) else: new_kwd[ 'status' ] = 'error' new_kwd[ 'message' ] = 'Invalid repository id value "None" received for repository to be purged.' 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)
-
commits-noreply@bitbucket.org