mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-06-23 15:30:45 -04: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
@ -222,7 +222,7 @@ class TemplateDialog(QDialog, Ui_TemplateDialog):
|
||||
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…
x
Reference in New Issue
Block a user