id,summary,reporter,owner,description,type,status,component,version,severity,resolution,keywords,cc,stage,has_patch,needs_docs,needs_tests,needs_better_patch,easy,ui_ux 3172,"Model.validate raises TypeError on NULL for DateField, DateTimeField, and TimeField",RahmCoff@…,Adrian Holovaty,"When you have a model with any of the date/time fields, it throws a TypeError. For example: {{{ class TestModel(models.Model): test_date = models.DateField() test_date_time = models.DateTimeField() test_time = models.TimeField() TestModel().validate() Traceback (most recent call last): File """", line 1, in ? File ""django/db/models/base.py"", line 230, in validate setattr(self, f.attname, f.to_python(getattr(self, f.attname, f.get_default()))) File ""django/db/models/fields/__init__.py"", line 435, in to_python validators.isValidANSIDate(value, None) File ""django/core/validators.py"", line 146, in isValidANSIDate if not ansi_date_re.search(field_data): TypeError: expected string or buffer }}} Similar errors appear with DateTime and Time.",defect,closed,"Database layer (models, ORM)",dev,normal,fixed,,sam@… floguy@…,Ready for checkin,1,0,0,0,0,0