mirror of
git://github.com/kovidgoyal/calibre.git
synced 2026-01-30 06:25:50 +01:00
Fixes use of 'size' field in coloring.
This commit is contained in:
parent
a34b8c310a
commit
5bd2d8d604
1 changed files with 4 additions and 1 deletions
|
|
@ -117,7 +117,10 @@ def number_condition(self, col, action, val):
|
|||
'lt': ('1', '', ''),
|
||||
'gt': ('', '', '1')
|
||||
}[action]
|
||||
return "cmp(raw_field('%s'), %s, '%s', '%s', '%s')" % (col, val, lt, eq, gt)
|
||||
if col == 'size':
|
||||
return "cmp(booksize(), %s, '%s', '%s', '%s')" % (val, lt, eq, gt)
|
||||
else:
|
||||
return "cmp(raw_field('%s'), %s, '%s', '%s', '%s')" % (col, val, lt, eq, gt)
|
||||
|
||||
def rating_condition(self, col, action, val):
|
||||
lt, eq, gt = {
|
||||
|
|
|
|||
Loading…
Reference in a new issue