mirror of
https://github.com/encode/django-rest-framework.git
synced 2025-07-27 00:19:53 +03:00
FloatField will crash if the input is a number that is too big
This commit is contained in:
parent
2510456817
commit
9aee257861
|
@ -943,7 +943,7 @@ class FloatField(Field):
|
|||
|
||||
try:
|
||||
return float(data)
|
||||
except (TypeError, ValueError):
|
||||
except (TypeError, ValueError, OverflowError):
|
||||
self.fail('invalid')
|
||||
|
||||
def to_representation(self, value):
|
||||
|
|
Loading…
Reference in New Issue
Block a user