From f0e42c3bf328c7c7a6f2480e54a1d7ec0b979f31 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Sat, 28 Sep 2024 09:41:06 +0530 Subject: [PATCH] Fix a regression in previous release that broke copying of book to another library if the books author does not exist in the destination database. --- src/calibre/db/tables.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/calibre/db/tables.py b/src/calibre/db/tables.py index d90fe79cf9..f0e7f00ffb 100644 --- a/src/calibre/db/tables.py +++ b/src/calibre/db/tables.py @@ -286,7 +286,7 @@ class ManyToOneTable(Table): 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}