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':