Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

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
  • Loading branch information...
commit d86624877de7b7db91c2966dd9bfa6ef8721b29e 1 parent 9b72153
@adrianholovaty adrianholovaty authored
Showing with 1 addition and 1 deletion.
  1. +1 −1  django/core/formfields.py
View
2  django/core/formfields.py
@@ -652,7 +652,7 @@ def html2python(data):
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)
Please sign in to comment.
Something went wrong with that request. Please try again.