py3: make column rules editor work

The sort key grades each string as a bytestring, so falling back on an
integer is incorrect.
This commit is contained in:
Eli Schwartz 2019-05-01 02:00:45 -04:00
parent d9918b5b9c
commit 4a49ea4352
No known key found for this signature in database
GPG Key ID: CEB167EFB5722BD6

View File

@ -429,7 +429,7 @@ class RuleEditor(QDialog): # {{{
b.setMinimumContentsLength(15)
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 b''):
if key == color_row_key and self.rule_kind != 'color':
continue
name = all_columns_string if key == color_row_key else fm[key]['name']