diff options
| author | Adrian Holovaty <adrian@holovaty.com> | 2005-09-27 03:34:58 +0000 |
|---|---|---|
| committer | Adrian Holovaty <adrian@holovaty.com> | 2005-09-27 03:34:58 +0000 |
| commit | d86624877de7b7db91c2966dd9bfa6ef8721b29e (patch) | |
| tree | 326bfe00d7b881ee97acf7736013dd5259226fd1 | |
| parent | 9b721531399d57886ba2e86db1296b481145776d (diff) | |
Fixed #213 -- Improved formfields.TimeField.html2python() so that it doesn't fail for None input
git-svn-id: http://code.djangoproject.com/svn/django/trunk@702 bcc190cf-cafb-0310-a4f2-bffc1f526a37
| -rw-r--r-- | django/core/formfields.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/django/core/formfields.py b/django/core/formfields.py index 5056dd7bad..7587b67170 100644 --- a/django/core/formfields.py +++ b/django/core/formfields.py @@ -652,7 +652,7 @@ class TimeField(TextField): except ValueError: # seconds weren't provided time_tuple = time.strptime(data, '%H:%M') return datetime.time(*time_tuple[3:6]) - except ValueError: + except (ValueError, TypeError): return None html2python = staticmethod(html2python) |
