Files
galaxy/lib
mvdbeek cf2645f9a6 Fix toolshed error in display_tool if tool is invalid
Fixes the following exception:

```
AttributeError: 'NoneType' object has no attribute 'id'
  File "galaxy/web/framework/middleware/sentry.py", line 43, in __call__
    iterable = self.application(environ, start_response)
  File "/srv/toolshed/main/venv/local/lib/python2.7/site-packages/paste/translogger.py", line 69, in __call__
    return self.application(environ, replacement_start_response)
  File "/srv/toolshed/main/venv/local/lib/python2.7/site-packages/paste/recursive.py", line 85, in __call__
    return self.application(environ, start_response)
  File "routes/middleware.py", line 141, in __call__
    response = self.app(environ, start_response)
  File "/srv/toolshed/main/venv/local/lib/python2.7/site-packages/paste/httpexceptions.py", line 640, in __call__
    return self.application(environ, start_response)
  File "galaxy/web/framework/base.py", line 143, in __call__
    return self.handle_request(environ, start_response)
  File "galaxy/web/framework/base.py", line 222, in handle_request
    body = method(trans, **kwargs)
  File "galaxy/webapps/tool_shed/controllers/repository.py", line 888, in display_tool
    tool_state = tool_util.new_state(trans, tool, invalid=False)
  File "tool_shed/util/tool_util.py", line 211, in new_state
    log.debug('Failed to build tool state for tool "%s" using standard method, will try to fall back on custom method: %s', tool.id, e)
```

(from https://sentry.galaxyproject.org/sentry/toolshed/issues/279820/).

Might also fix some other issues when redering workflow svg for
workflows with invalid tools.
2018-10-29 10:34:37 +01:00
..