Ticket #11411: fields.diff

File fields.diff, 428 bytes (added by kovalidis@…, 6 years ago)
  • fields.py

    old new  
    245245        if not self.required and value in EMPTY_VALUES:
    246246            return None
    247247        value = smart_str(value).strip()
     248        if value == 'NaN':
     249            raise ValidationError(self.error_messages['invalid'])
    248250        try:
    249251            value = Decimal(value)
    250252        except DecimalException:
Back to Top