From 231c0a4bbfddfb097d9cc97c9c010b0f9d000e5d Mon Sep 17 00:00:00 2001 From: Charles Haley <> Date: Fri, 8 Jul 2011 07:50:51 +0100 Subject: [PATCH] Fix 807262: true/false searches don't work on device views. --- src/calibre/gui2/library/models.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/calibre/gui2/library/models.py b/src/calibre/gui2/library/models.py index 8cbc2e1979..0937f0bb12 100644 --- a/src/calibre/gui2/library/models.py +++ b/src/calibre/gui2/library/models.py @@ -950,11 +950,11 @@ class OnDeviceSearch(SearchQueryParser): # {{{ for locvalue in locations: accessor = q[locvalue] if query == 'true': - if accessor(row) is not None: + if accessor(row): matches.add(index) continue if query == 'false': - if accessor(row) is None: + if not accessor(row): matches.add(index) continue if locvalue == 'inlibrary':