Ticket #13390: 13390.fix.patch

File 13390.fix.patch, 591 bytes (added by phxx, 5 years ago)

Naive bug fix, needs review.

  • django/forms/fields.py

    === modified file 'django/forms/fields.py'
     
    397397            # components: date and time.
    398398            if len(value) != 2:
    399399                raise ValidationError(self.error_messages['invalid'])
     400            if value[0] in validators.EMPTY_VALUES and value[1] in validators.EMPTY_VALUES:
     401                return None
    400402            value = '%s %s' % tuple(value)
    401403        for format in self.input_formats or formats.get_format('DATETIME_INPUT_FORMATS'):
    402404            try:
Back to Top