From 6f6da271609616d618aff773c5014df2ddfb44d7 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Sun, 26 Mar 2023 10:03:41 +0530 Subject: [PATCH] Similar books: Fix changing the search to be over a custom column not working. Fixes #2012803 ["Similar Books" does not search using column lookups names specified in settings](https://bugs.launchpad.net/calibre/+bug/2012803) --- src/calibre/gui2/actions/similar_books.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/calibre/gui2/actions/similar_books.py b/src/calibre/gui2/actions/similar_books.py index 3d74bb6068..ea1ae5e4d7 100644 --- a/src/calibre/gui2/actions/similar_books.py +++ b/src/calibre/gui2/actions/similar_books.py @@ -77,7 +77,7 @@ class SimilarBooksAction(InterfaceAction): # Get the value of the requested field. Can be a list or a simple # val. It is possible that col no longer exists, in which case fall # back to the default - if col not in mi: + if col not in mi.all_field_keys(): col = db.prefs.defaults[key] val = mi.get(col, None) if not val: