mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Handle broken code trying to set numeric columns with empty strings
This commit is contained in:
parent
7d54d25844
commit
52c973ce79
@ -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)
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user