openhealthcare / randomise.me

The Randomise Me Website
http://randomiseme.org
Other
7 stars 8 forks source link

Fail better for query access of userland data. #218

Closed davidmiller closed 11 years ago

davidmiller commented 11 years ago
Traceback (most recent call last):

  File "/home/app/randomise_me/local/lib/python2.7/site-packages/django/core/handlers/base.py", line 115, in get_response
    response = callback(request, _callback_args, *_callback_kwargs)

  File "/home/app/randomise_me/local/lib/python2.7/site-packages/django/views/generic/base.py", line 68, in view
    return self.dispatch(request, _args, *_kwargs)

  File "/home/app/randomise_me/local/lib/python2.7/site-packages/django/views/generic/base.py", line 86, in dispatch
    return handler(request, _args, *_kwargs)

  File "/home/app/randomise_me/rm/trials/views.py", line 185, in post
    binary = int(self.request.POST['binary']) == 1

  File "/home/app/randomise_me/local/lib/python2.7/site-packages/django/utils/datastructures.py", line 295, in **getitem**
    raise MultiValueDictKeyError("Key %r not found in %r" % (key, self))

MultiValueDictKeyError: "Key 'binary' not found in <QueryDict: {u'date': [u'12/07/2013'], u'csrfmiddlewaretoken': [u'RCVChoordCl9xizvoVbJTcuzVf1H5OKi']}>"
davidmiller commented 11 years ago

Essentially a "I don't have javascript installed but I somehow forced the form to post" problem :(