From ce873c757a927982f530cc28f48253177c4e6e35 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Tue, 30 Jul 2024 15:28:00 +0530 Subject: [PATCH] Possible fix for exception on direct access to local books Cannot reproduce so not sure. Fixes #2073972 [[Content Server] Downloaded Books page error when using Custom Book List](https://bugs.launchpad.net/calibre/+bug/2073972) --- src/pyj/book_list/custom_list.pyj | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/pyj/book_list/custom_list.pyj b/src/pyj/book_list/custom_list.pyj index 0b55e6373a..080236dba7 100644 --- a/src/pyj/book_list/custom_list.pyj +++ b/src/pyj/book_list/custom_list.pyj @@ -62,7 +62,7 @@ def render_field(field, mi, book_id): # {{{ return book_id + '' field_metadata = library_data.field_metadata fm = field_metadata[field] - if not fm: + if not fm or not mi: return val = mi[field] if val is undefined or val is None: