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(