Ticket #10435 (closed: fixed)

Opened 6 years ago

Last modified 6 years ago

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:

  1. Navigate to http://datareducedev.isis.cclrc.ac.uk/autoreduce_webapp/instrument/GEM/
  2. Create or edit some new instrument variables
  3. Toggle the boolean variable (in advanced variables)
  4. Verify that the value saved matches the state of the checkbox

Change History

comment:1 Changed 6 years ago by MarcusNoble

  • Status changed from new to assigned

comment:2 Changed 6 years ago by MarcusNoble

  • Status changed from assigned to verify
  • Resolution set to fixed
  • Description modified (diff)

comment:3 Changed 6 years ago by Anders Markvardsen

  • Status changed from verify to verifying
  • Tester set to Anders Markvardsen

comment:4 Changed 6 years ago by Anders Markvardsen

  • Status changed from verifying to closed

This works and clear message came up when asking if want to overwrite existing values

Note: See TracTickets for help on using tickets.