Handle broken code trying to set numeric columns with empty strings

This commit is contained in:
Kovid Goyal 2013-09-16 08:19:15 +05:30
parent 7d54d25844
commit 52c973ce79

View File

@ -83,7 +83,7 @@ def adapt_number(typ, x):
if x is None:
return None
if isinstance(x, (unicode, bytes)):
if x.lower() == 'none':
if not x or x.lower() == 'none':
return None
return typ(x)