magic-removal: Fixed #1172, Datetime fields in admin interface shouldn't be cleared for validation errors.

Simply return the bad data.


git-svn-id: http://code.djangoproject.com/svn/django/branches/magic-removal@2446 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
Duncan Foster 2006-02-28 19:27:42 +00:00
parent 2f27df2784
commit 53ac6f9782
1 changed files with 1 additions and 1 deletions

View File

@ -781,7 +781,7 @@ class DateField(TextField):
time_tuple = time.strptime(data, '%Y-%m-%d')
return datetime.date(*time_tuple[0:3])
except (ValueError, TypeError):
return None
return data
html2python = staticmethod(html2python)
class TimeField(TextField):