Commit c98223f2 by Ryan P Kilby Committed by Carlton Gibson

Pass on invalid value (Inf, NaN) encoding in JSONBoundField

parent 901657e7
......@@ -88,7 +88,7 @@ class JSONBoundField(BoundField):
value = self.value
try:
value = json.dumps(self.value, sort_keys=True, indent=4)
except TypeError:
except (TypeError, ValueError):
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