New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[18.01] Show error message if user tries purging datasets #5664

Merged
merged 1 commit into from Mar 8, 2018

Conversation

Projects
None yet
2 participants
@mvdbeek
Member

mvdbeek commented Mar 8, 2018

without having an associated history.

This can be seen by pasting http://<gx_instance>/history/purge_deleted_datasets
into an anonymous browser session (be careful to not delete something important ;)).

Traceback is:

AttributeError: 'NoneType' object has no attribute 'datasets'
  File "galaxy/web/framework/middleware/sentry.py", line 43, in __call__
    iterable = self.application(environ, start_response)
  File "/cvmfs/main.galaxyproject.org/venv/lib/python2.7/site-packages/paste/recursive.py", line 85, in __call__
    return self.application(environ, start_response)
  File "galaxy/web/framework/middleware/statsd.py", line 35, in __call__
    req = self.application(environ, start_response)
  File "/cvmfs/main.galaxyproject.org/venv/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 136, in __call__
    return self.handle_request(environ, start_response)
  File "galaxy/web/framework/base.py", line 215, in handle_request
    body = method(trans, **kwargs)
  File "galaxy/webapps/galaxy/controllers/history.py", line 1108, in purge_deleted_datasets
    for hda in trans.history.datasets:
Show error message if user tries purging datasets
without having an associated history.

This can be seen by pasting http://<gx_instance>/history/purge_deleted_datasets
into an anonymous browser session (be careful to not delete something important ;)).

Traceback is:
```
AttributeError: 'NoneType' object has no attribute 'datasets'
  File "galaxy/web/framework/middleware/sentry.py", line 43, in __call__
    iterable = self.application(environ, start_response)
  File "/cvmfs/main.galaxyproject.org/venv/lib/python2.7/site-packages/paste/recursive.py", line 85, in __call__
    return self.application(environ, start_response)
  File "galaxy/web/framework/middleware/statsd.py", line 35, in __call__
    req = self.application(environ, start_response)
  File "/cvmfs/main.galaxyproject.org/venv/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 136, in __call__
    return self.handle_request(environ, start_response)
  File "galaxy/web/framework/base.py", line 215, in handle_request
    body = method(trans, **kwargs)
  File "galaxy/webapps/galaxy/controllers/history.py", line 1108, in purge_deleted_datasets
    for hda in trans.history.datasets:
```

@mvdbeek mvdbeek added this to the 18.01 milestone Mar 8, 2018

@martenson martenson merged commit 1761d85 into galaxyproject:release_18.01 Mar 8, 2018

5 of 6 checks passed

selenium test Test started.
Details
api test Build finished. 351 tests run, 4 skipped, 0 failed.
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
framework test Build finished. 173 tests run, 0 skipped, 0 failed.
Details
integration test Build finished. 79 tests run, 4 skipped, 0 failed.
Details
toolshed test Build finished. 577 tests run, 0 skipped, 0 failed.
Details

@mvdbeek mvdbeek deleted the mvdbeek:show_error_message_if_no_history_associated branch Jun 12, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment