workaround a dateutil bug
In the latest released version of dateutil, there's a bug whereby a TypeError can be raised whilst parsing a date. This is because it calls a method which it expects to return 2 arguments, however it can return 1 depending upon the input, which results in a TypeError: ArgType not iterable exception. Since this is equivalent to a failed parse anyway, we can treat it the same as a ValueError.
This commit is contained in:
		| @@ -391,7 +391,7 @@ class DateTimeField(BaseField): | |||||||
|         if dateutil: |         if dateutil: | ||||||
|             try: |             try: | ||||||
|                 return dateutil.parser.parse(value) |                 return dateutil.parser.parse(value) | ||||||
|             except ValueError: |             except (TypeError, ValueError): | ||||||
|                 return None |                 return None | ||||||
|  |  | ||||||
|         # split usecs, because they are not recognized by strptime. |         # split usecs, because they are not recognized by strptime. | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user