From d38c3a9fd938d236301acd851af70b624414fac5 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Fri, 3 Jun 2011 14:49:14 -0600 Subject: [PATCH] Fix is set and is not set coloring conditions for test columns --- src/calibre/library/coloring.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/calibre/library/coloring.py b/src/calibre/library/coloring.py index c8cafcf9eb..0102f8f977 100644 --- a/src/calibre/library/coloring.py +++ b/src/calibre/library/coloring.py @@ -128,9 +128,9 @@ class Rule(object): # {{{ def multiple_condition(self, col, action, val, sep): if action == 'is set': - return "test('%s', '1', '')"%col + return "test(field('%s'), '1', '')"%col if action == 'is not set': - return "test('%s', '', '1')"%col + return "test(field('%s'), '', '1')"%col if action == 'has': return "str_in_list(field('%s'), '%s', \"%s\", '1', '')"%(col, sep, val) if action == 'does not have': @@ -142,9 +142,9 @@ class Rule(object): # {{{ def text_condition(self, col, action, val): if action == 'is set': - return "test('%s', '1', '')"%col + return "test(field('%s'), '1', '')"%col if action == 'is not set': - return "test('%s', '', '1')"%col + return "test(field('%s'), '', '1')"%col if action == 'is': return "strcmp(field('%s'), \"%s\", '', '1', '')"%(col, val) if action == 'is not':