mirror of
https://github.com/wassname/FanFicFare.git
synced 2026-09-12 12:02:50 +08:00
Set boolean custom columns from personal.ini when t/true/yes/y/1 vs
f/false/no/n/0.
This commit is contained in:
@@ -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':
|
||||
|
||||
Reference in New Issue
Block a user