Skip to content

Commit

Permalink
magic-removal: Fixed #1172, Datetime fields in admin interface should…
Browse files Browse the repository at this point in the history
…n'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
  • Loading branch information
Duncan Foster committed Feb 28, 2006
1 parent 2f27df2 commit 53ac6f9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion django/forms/__init__.py
Expand Up @@ -781,7 +781,7 @@ def html2python(data):
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):
Expand Down

0 comments on commit 53ac6f9

Please sign in to comment.