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)

This commit is contained in:
Kovid Goyal 2023-03-26 10:03:41 +05:30
parent b2aa59b484
commit 6f6da27160
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C

View File

@ -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: