Set boolean custom columns from personal.ini when t/true/yes/y/1 vs

f/false/no/n/0.
This commit is contained in:
Jim Miller
2014-02-21 19:07:32 -06:00
parent c8a89fa8b2
commit 8980eaf21b
+7
View File
@@ -1576,6 +1576,13 @@ class FanFictionDownLoaderPlugin(InterfaceAction):
else:
val = val
if val != '':
if coldef['datatype'] == 'bool':
if val.lower() in ('t','true','1','yes','y'):
val = True
elif val.lower() in ('f','false','0','no','n'):
val = False
else:
val = None # for tri-state 'booleans'. Yes/No/Null
db.set_custom(book_id, val, label=label, commit=False)
if flag == 'a':