mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-07 18:24:30 -04:00
Fix for tag browser "AttributeError: 'NoneType' object has no attribute 'name'"
I found this by accident: calibre 6.8* embedded-python: True Windows-10-10.0.19044-SP0 Windows ('64bit', 'WindowsPE') ('Windows', '10', '10.0.19044') Python 3.10.1 [...] File "C:\CBH_Data\calibre.git\calibre_dev\src\calibre\gui2\tag_browser\view.py", line 981, in show_context_menu AttributeError: 'NoneType' object has no attribute 'name'
This commit is contained in:
parent
cad8b4bb24
commit
554ef89482
@ -977,7 +977,7 @@ class TagsView(QTreeView): # {{{
|
|||||||
self.context_menu.addAction(_('Manage Saved searches'),
|
self.context_menu.addAction(_('Manage Saved searches'),
|
||||||
partial(self.context_menu_handler, action='manage_searches',
|
partial(self.context_menu_handler, action='manage_searches',
|
||||||
category=tag.name if tag else None))
|
category=tag.name if tag else None))
|
||||||
elif key == 'formats':
|
elif key == 'formats' and tag is not None:
|
||||||
self.context_menu.addAction(_('Remove the {} format from selected books').format(tag.name), partial(
|
self.context_menu.addAction(_('Remove the {} format from selected books').format(tag.name), partial(
|
||||||
self.context_menu_handler, action='remove_format', key=tag.name))
|
self.context_menu_handler, action='remove_format', key=tag.name))
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user