mirror of
https://github.com/encode/django-rest-framework.git
synced 2024-11-10 19:56:59 +03:00
Pass on invalid value (Inf, NaN) encoding in JSONBoundField
This commit is contained in:
parent
901657e7e8
commit
c98223f231
|
@ -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)
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user