From 62c78290c156f3225f32a721107a2cd8e6035416 Mon Sep 17 00:00:00 2001 From: Charles Haley Date: Mon, 24 Feb 2014 18:44:35 +0100 Subject: [PATCH] Allow the empty string when writing to bool custom columns. Bulk edit uses the empty string for None, at least in this case. --- src/calibre/db/write.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/calibre/db/write.py b/src/calibre/db/write.py index 175b484c91..7dd278fa57 100644 --- a/src/calibre/db/write.py +++ b/src/calibre/db/write.py @@ -94,7 +94,7 @@ def adapt_bool(x): x = True elif x == 'false': x = False - elif x == 'none': + elif x == 'none' or x == '': x = None else: x = bool(int(x))