spiral-project / daybed

Form validation and data storage API
http://daybed.rtfd.org/
BSD 3-Clause "New" or "Revised" License
52 stars 8 forks source link

Redis backend: colander.null is not JSON serializable #263

Closed leplatrem closed 10 years ago

leplatrem commented 10 years ago
  File "/home/mle/Code/daybed/src/daybed/views/models.py", line 198, in put_model
    return handle_put_model(request, create=True)
  File "/home/mle/Code/daybed/src/daybed/views/models.py", line 223, in handle_put_model
    record_id = request.db.put_record(model_id, record, [credentials_id])
  File "/home/mle/Code/daybed/src/daybed/backends/redis/__init__.py", line 136, in put_record
    json.dumps(doc)
  File "/usr/lib/python2.7/json/__init__.py", line 243, in dumps
    return _default_encoder.encode(obj)
  File "/usr/lib/python2.7/json/encoder.py", line 207, in encode
    chunks = self.iterencode(o, _one_shot=True)
  File "/usr/lib/python2.7/json/encoder.py", line 270, in iterencode
    return _iterencode(o, 0)
  File "/usr/lib/python2.7/json/encoder.py", line 184, in default
    raise TypeError(repr(o) + " is not JSON serializable")
TypeError: <colander.null> is not JSON serializable