Commit f56b1170 by Dave Allan

Pass non-JSON serializable values through unmodified

parent 7a0bd1c4
......@@ -85,7 +85,11 @@ class BoundField(object):
class JSONBoundField(BoundField):
def as_form_field(self):
value = json.dumps(self.value, sort_keys=True, indent=4)
value = self.value
try:
value = json.dumps(self.value, sort_keys=True, indent=4)
except TypeError:
pass
return self.__class__(self._field, value, self.errors, self._prefix)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment