mirror of
				https://github.com/django/django.git
				synced 2025-10-31 09:41:08 +00:00 
			
		
		
		
	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
This commit is contained in:
		| @@ -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) | ||||
|  | ||||
|   | ||||
		Reference in New Issue
	
	Block a user