Fix tag like custom columns not sorted when displayed in the Book Details panel. Fixes #1578688 [Comma-separated field sorted in library view, but not in Book Details](https://bugs.launchpad.net/calibre/+bug/1578688)

This commit is contained in:
Kovid Goyal 2016-05-14 16:35:39 +05:30
commit 905740d818

View File

@ -228,7 +228,7 @@ def mi_to_html(mi, field_list=None, default_author_link=None, use_roman_numbers=
except Exception:
st = field
all_vals = mi.get(field)
if field == 'tags':
if not metadata.get('display', {}).get('is_names', False):
all_vals = sorted(all_vals, key=sort_key)
links = ['<a href="%s" title="%s" data-item="%s">%s</a>' % (
search_href(st, x), _('Click to see books with {0}: {1}').format(