Ticket #8233: decimal_validator.diff

File decimal_validator.diff, 540 bytes (added by Michel Sabchuk, 16 years ago)

Patch over the trunk (r8301).

  • django/db/models/fields/__init__.py

     
    701701        if value is None:
    702702            return value
    703703        try:
     704            if isinstance(value, float):
     705                value = self.format_number(value)
    704706            return decimal.Decimal(value)
    705707        except decimal.InvalidOperation:
    706708            raise validators.ValidationError(
Back to Top