mirror of
https://github.com/encode/django-rest-framework.git
synced 2024-11-25 19:14:01 +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
|
||||
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)
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user