From 66995472162d6aab4ec2d9e5eff914ffdae36403 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Wed, 4 Jul 2012 10:35:27 +0530 Subject: [PATCH] Fix yes/no fields with value of No not showing up in the book details panel --- src/calibre/gui2/book_details.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/calibre/gui2/book_details.py b/src/calibre/gui2/book_details.py index 00bd4135b1..6bc8d878ad 100644 --- a/src/calibre/gui2/book_details.py +++ b/src/calibre/gui2/book_details.py @@ -104,8 +104,10 @@ def render_data(mi, use_roman_numbers=True, all_fields=False): field = 'title_sort' if all_fields: display = True - if (not display or not metadata or mi.is_null(field) or - field == 'comments'): + isnull = mi.is_null(field) + if metadata['datatype'] == 'bool': + isnull = mi.get(field) is None + if (not display or not metadata or isnull or field == 'comments'): continue name = metadata['name'] if not name: