Ticket #11003 (closed: fixed)
Add checks for instrument in experiment dictionary
Reported by: | MarcusNoble | Owned by: | Lottie Greenwood |
---|---|---|---|
Priority: | minor | Milestone: | Release 3.4 |
Component: | Tools | Keywords: | AUTOREDUCTION |
Cc: | Blocked By: | ||
Blocking: | Tester: | Ian Bush |
Description
In file autoreduce_webapp\reduction_viewer\views.py on line 112 it is possible to throw an exception when trying to access an instrument name that doesn't exist. A simple check for the instrument name in the dictionary's keys would be enough with an empty list being saved if it is not found.
Change History
comment:2 Changed 6 years ago by Lottie Greenwood
- Status changed from assigned to verify
- Resolution set to fixed
comment:3 Changed 6 years ago by Lottie Greenwood
To test: Log onto autoreduction (http://reduce.isis.cclrc.ac.uk/) with an account that has access to a particular instrument for autoreduction, but has no experiments available to view for that instrument. Check everything loads correctly.
comment:4 Changed 6 years ago by Ian Bush
This works, but should there be a corresponding commit for this?
comment:5 Changed 6 years ago by Lottie Greenwood
Here is corresponding pull request: https://github.com/mantidproject/autoreduce/pull/3