Skip to content

Commit

Permalink
Fix a regression in previous release that broke copying of book to an…
Browse files Browse the repository at this point in the history
…other library if the books author does not exist in the destination database.
  • Loading branch information
kovidgoyal committed Sep 28, 2024
1 parent 8d95d74 commit f0e42c3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/calibre/db/tables.py
Original file line number Diff line number Diff line change
Expand Up @@ -286,7 +286,7 @@ def item_ids_for_names(self, db, item_names: Iterable[str], case_sensitive: bool
for iid, name in self.id_map.items():
if icu_lower(name) == q:
return {item_names[0]: iid}
return {item_names[0]: iid}
return {item_names[0]: None}
rmap = {icu_lower(v) if isinstance(v, str) else v:k for k, v in self.id_map.items()}
return {name: rmap.get(icu_lower(name) if isinstance(name, str) else name, None) for name in item_names}

Expand Down

0 comments on commit f0e42c3

Please sign in to comment.