From e23664383d94b7ac88477dc6cc5e58057ea1f0a5 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Tue, 24 Oct 2023 13:57:01 +0530 Subject: [PATCH] ... --- src/pyj/book_list/book_details.pyj | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/pyj/book_list/book_details.pyj b/src/pyj/book_list/book_details.pyj index 92781571b4..4c6cf35f49 100644 --- a/src/pyj/book_list/book_details.pyj +++ b/src/pyj/book_list/book_details.pyj @@ -196,7 +196,7 @@ def render_metadata(mi, table, book_id, iframe_css): # {{{ show_note(field, item_id, item_val) def add_note_link(field, name, val, parent): - if mi.items_with_notes[field] and mi.items_with_notes[field][val]: + if mi.items_with_notes and mi.items_with_notes[field] and mi.items_with_notes[field][val]: parent.appendChild(document.createTextNode(' ')) parent.appendChild(E.a( svgicon('pencil'), title=_('Show notes for: {}').format(val), href='javascript:void(0)', onclick=show_note_action.bind(