Fix #1740987 [Error: Unhandled exception after search](https://bugs.launchpad.net/calibre/+bug/1740987)

This commit is contained in:
Kovid Goyal 2018-01-03 09:48:28 +05:30
parent 589214ce67
commit bfcd447b6c
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C

View File

@ -316,8 +316,15 @@ class ViewAction(InterfaceAction):
return
if self.gui.current_view() is self.gui.library_view:
ids = list(map(self.gui.library_view.model().id, rows))
self._view_calibre_books(ids)
ids = []
m = self.gui.library_view.model().id
for r in rows:
try:
ids.append(m(r))
except Exception:
pass
if ids:
self._view_calibre_books(ids)
else:
paths = self.gui.current_view().model().paths(rows)
for path in paths: