Fix #2036993 [Unhandled exception error when removing books](https://bugs.launchpad.net/calibre/+bug/2036993)

This commit is contained in:
Kovid Goyal 2023-09-21 22:13:22 +05:30
parent 1304e1c119
commit 0768e046eb
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C

View File

@ -1901,7 +1901,8 @@ class Cache:
self.fields['size'].table.update_sizes(size_map)
for book_id, fmts in iteritems(formats_map):
run_plugins_on_postdelete(self, book_id, fmt)
for fmt in fmts:
run_plugins_on_postdelete(self, book_id, fmt)
self._update_last_modified(tuple(formats_map))
self.event_dispatcher(EventType.formats_removed, formats_map)