From e89dbb1d3fd64c09978eff8c1332006e83e2ecf7 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Sat, 27 Jun 2020 08:30:41 +0530 Subject: [PATCH] Fix #1885318 [Private bug](https://bugs.launchpad.net/calibre/+bug/1885318) --- src/calibre/ebooks/metadata/book/render.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/calibre/ebooks/metadata/book/render.py b/src/calibre/ebooks/metadata/book/render.py index 885c47424f..c796bbb4a4 100644 --- a/src/calibre/ebooks/metadata/book/render.py +++ b/src/calibre/ebooks/metadata/book/render.py @@ -294,7 +294,7 @@ def mi_to_html( all_vals = sorted(all_vals, key=sort_key) links = ['%s' % ( search_action_with_data(st, x, book_id, field), _('Click to see books with {0}: {1}').format( - metadata['name'], a(x)), p(x)) + metadata['name'] or field, a(x)), p(x)) for x in all_vals] val = metadata['is_multiple']['list_to_ui'].join(links) elif metadata['datatype'] == 'text' or metadata['datatype'] == 'enumeration': @@ -305,7 +305,7 @@ def mi_to_html( st = field val = '%s' % ( search_action_with_data(st, val, book_id, field), a( - _('Click to see books with {0}: {1}').format(metadata['name'], val)), p(val)) + _('Click to see books with {0}: {1}').format(metadata['name'] or field, val)), p(val)) ans.append((field, row % (name, val)))