FloatField will crash if the input is a number that is too big

This commit is contained in:
reeko234 2022-10-21 08:41:01 +00:00
parent 2510456817
commit 9aee257861

View File

@ -943,7 +943,7 @@ class FloatField(Field):
try: try:
return float(data) return float(data)
except (TypeError, ValueError): except (TypeError, ValueError, OverflowError):
self.fail('invalid') self.fail('invalid')
def to_representation(self, value): def to_representation(self, value):