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)
This commit is contained in:
Kovid Goyal 2024-07-30 15:28:00 +05:30
parent c8f7cf15c1
commit ce873c757a
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C

View File

@ -62,7 +62,7 @@ def render_field(field, mi, book_id): # {{{
return book_id + '' return book_id + ''
field_metadata = library_data.field_metadata field_metadata = library_data.field_metadata
fm = field_metadata[field] fm = field_metadata[field]
if not fm: if not fm or not mi:
return return
val = mi[field] val = mi[field]
if val is undefined or val is None: if val is undefined or val is None: