Ticket #14659: DecimalField-accepting-floats-with-dots.patch
File DecimalField-accepting-floats-with-dots.patch, 478 bytes (added by , 14 years ago) |
---|
-
fields/__init__.py
758 758 if value is None: 759 759 return value 760 760 try: 761 return decimal.Decimal( value)761 return decimal.Decimal(str(value)) 762 762 except decimal.InvalidOperation: 763 763 raise exceptions.ValidationError(self.error_messages['invalid']) 764 764