Update fields.py

This commit is contained in:
Chuan Shi 2019-03-07 15:29:40 -08:00 committed by GitHub
parent 9bfb58746e
commit 699125a4f7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1080,7 +1080,7 @@ class DecimalField(Field):
if value in (decimal.Decimal('Inf'), decimal.Decimal('-Inf')): if value in (decimal.Decimal('Inf'), decimal.Decimal('-Inf')):
self.fail('invalid') self.fail('invalid')
return self.quantize(self.validate_precision(value)) return self.validate_precision(self.quantize(value))
def validate_precision(self, value): def validate_precision(self, value):
""" """