Skip to content

Commit 9aee257

Browse files
committed
FloatField will crash if the input is a number that is too big
1 parent 2510456 commit 9aee257

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

rest_framework/fields.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -943,7 +943,7 @@ def to_internal_value(self, data):
943943

944944
try:
945945
return float(data)
946-
except (TypeError, ValueError):
946+
except (TypeError, ValueError, OverflowError):
947947
self.fail('invalid')
948948

949949
def to_representation(self, value):

0 commit comments

Comments
 (0)