Add the ability to uninstall a Tool Shed repository installed into Galaxy but in an error state.

This commit is contained in:
Greg Von Kuster
2014-06-26 11:52:42 -04:00
parent 0dd09dd6a5
commit bc460f36a7
2 changed files with 4 additions and 4 deletions
@@ -68,7 +68,9 @@ class ToolShedRepository( object ):
@property
def can_deactivate( self ):
return self.status not in [ self.installation_status.DEACTIVATED, self.installation_status.UNINSTALLED ]
return self.status not in [ self.installation_status.DEACTIVATED,
self.installation_status.ERROR,
self.installation_status.UNINSTALLED ]
@property
def can_reinstall_or_activate( self ):
@@ -194,9 +194,7 @@ class InstalledRepositoryGrid( grids.Grid ):
grids.GridOperation( label="Deactivate or uninstall",
condition=( lambda item: \
not item.deleted and \
item.status not in \
[ tool_shed_install.ToolShedRepository.installation_status.ERROR,
tool_shed_install.ToolShedRepository.installation_status.NEW ] ),
item.status != tool_shed_install.ToolShedRepository.installation_status.NEW ),
allow_multiple=False,
url_args=dict( controller='admin_toolshed',
action='browse_repositories',