mirror of
git://github.com/kovidgoyal/calibre.git
synced 2025-12-25 18:44:41 +01:00
py3: use correct sort key for forcing an element to sort first
0 isn't a valid comparison for ICU sort_key() output and returns tracebacks instead, but sort_key(0) is.
This commit is contained in:
parent
a3dbdf7875
commit
cbf7bd49df
1 changed files with 1 additions and 1 deletions
|
|
@ -222,7 +222,7 @@ def __init__(self, parent, text, mi=None, fm=None, color_field=None,
|
|||
cols = []
|
||||
if fm is not None:
|
||||
for key in sorted(displayable_columns(fm),
|
||||
key=lambda k: sort_key(fm[k]['name']) if k != color_row_key else 0):
|
||||
key=lambda k: sort_key(fm[k]['name'] if k != color_row_key else 0)):
|
||||
if key == color_row_key and not self.coloring:
|
||||
continue
|
||||
from calibre.gui2.preferences.coloring import all_columns_string
|
||||
|
|
|
|||
Loading…
Reference in a new issue