Bug #2049428: Lookup name ... doesn't have a link map

This commit is contained in:
Charles Haley 2024-01-15 20:03:19 +00:00
parent 0fc78f89e0
commit 18482c9ff8

View File

@ -242,7 +242,8 @@ class TagTreeItem: # {{{
tt.append(_('Number of books: %s') % self.item_count)
from calibre.gui2.ui import get_gui
db = get_gui().current_db.new_api
link = db.get_link_map(tag.category).get(tag.original_name)
link = (None if not db.has_link_map(tag.category)
else db.get_link_map(tag.category).get(tag.original_name))
if link:
tt.append(_('Link: %s') % link)
return '\n'.join(tt)