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

This commit is contained in:
Ryan P Kilby 2017-07-10 18:51:44 -04:00 committed by Carlton Gibson
parent 901657e7e8
commit c98223f231

View File

@ -88,7 +88,7 @@ class JSONBoundField(BoundField):
value = self.value value = self.value
try: try:
value = json.dumps(self.value, sort_keys=True, indent=4) value = json.dumps(self.value, sort_keys=True, indent=4)
except TypeError: except (TypeError, ValueError):
pass pass
return self.__class__(self._field, value, self.errors, self._prefix) return self.__class__(self._field, value, self.errors, self._prefix)