Ticket #10435 (closed: fixed)
Unable to set boolean value to false
Reported by: | MarcusNoble | Owned by: | MarcusNoble |
---|---|---|---|
Priority: | major | Milestone: | Release 3.3 |
Component: | Tools | Keywords: | AUTOREDUCTION |
Cc: | doucetm@…, tom.griffin@…, nick.draper@…, anders.markvardsen@… | Blocked By: | |
Blocking: | #10147 | Tester: | Anders Markvardsen |
Description (last modified by MarcusNoble) (diff)
When updating instrument variables, if unchecking a boolean value the following error is received...
Environment: Request Method: POST Request URL: http://datareducedev.isis.cclrc.ac.uk/autoreduce_webapp/instrument/GEM/variables/52355/0/ Django Version: 1.7 Python Version: 2.7.6 Installed Applications: ('django.contrib.admin', 'django.contrib.auth', 'django.contrib.contenttypes', 'django.contrib.sessions', 'django.contrib.messages', 'django.contrib.staticfiles', 'django.contrib.humanize', 'autoreduce_webapp', 'reduction_viewer', 'reduction_variables') Installed Middleware: ('django.contrib.sessions.middleware.SessionMiddleware', 'django.middleware.common.CommonMiddleware', 'django.middleware.csrf.CsrfViewMiddleware', 'django.contrib.auth.middleware.AuthenticationMiddleware', 'django.contrib.auth.middleware.SessionAuthenticationMiddleware', 'django.contrib.messages.middleware.MessageMiddleware', 'django.middleware.clickjacking.XFrameOptionsMiddleware') Traceback: File "/usr/local/lib/python2.7/site-packages/django/core/handlers/base.py" in get_response 111. response = wrapped_callback(request, *callback_args, **callback_kwargs) File "/var/www/autoreduce_webapp/autoreduce_webapp/view_utils.py" in request_processor 15. return fn(request, *args, **kws) File "/var/www/autoreduce_webapp/autoreduce_webapp/view_utils.py" in wrapper 65. output = fn(request, *args, **kw) File "/var/www/autoreduce_webapp/autoreduce_webapp/view_utils.py" in request_processor 27. return fn(request, *args, **kws) File "/var/www/autoreduce_webapp/reduction_variables/views.py" in instrument_variables 135. variable.scripts.clear() File "/usr/local/lib/python2.7/site-packages/django/db/models/fields/related.py" in __get__ 1162. through=self.field.rel.through, File "/usr/local/lib/python2.7/site-packages/django/db/models/fields/related.py" in __init__ 827. (instance, source_field_name)) Exception Type: ValueError at /instrument/GEM/variables/52355/0/ Exception Value: "<InstrumentVariable: GEM - bool=True>" needs to have a value for field "instrumentvariable" before this many-to-many relationship can be used.
For Tester:
- Navigate to http://datareducedev.isis.cclrc.ac.uk/autoreduce_webapp/instrument/GEM/
- Create or edit some new instrument variables
- Toggle the boolean variable (in advanced variables)
- Verify that the value saved matches the state of the checkbox
Change History
Note: See
TracTickets for help on using
tickets.