diff --git a/src/calibre/library/coloring.py b/src/calibre/library/coloring.py index 6f98352928..476429549c 100644 --- a/src/calibre/library/coloring.py +++ b/src/calibre/library/coloring.py @@ -144,6 +144,10 @@ class Rule(object): # {{{ return "cmp(raw_field('%s'), %s, '%s', '%s', '%s')" % (col, val, lt, eq, gt) def rating_condition(self, col, action, val): + if action == 'is set': + return "test(field('%s'), '1', '')"%col + if action == 'is not set': + return "test(field('%s'), '', '1')"%col lt, eq, gt = { 'eq': ('', '1', ''), 'lt': ('1', '', ''),