From 5eea9ca02389a76984bc0e65589f66e6feef5783 Mon Sep 17 00:00:00 2001 From: Michiel Nauta Date: Mon, 13 Jun 2011 08:27:50 +0000 Subject: [PATCH] 4856: Gedcom import of empty note leads to invalid database svn: r17768 --- src/plugins/lib/libgedcom.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/plugins/lib/libgedcom.py b/src/plugins/lib/libgedcom.py index f2f856412..ce08297c0 100644 --- a/src/plugins/lib/libgedcom.py +++ b/src/plugins/lib/libgedcom.py @@ -5566,14 +5566,14 @@ class GedcomParser(UpdateCallback): LOG.debug('Error: obj is None') def __parse_inline_note(self, line, level): - if not line.data: + gid = self.nid_map[line.token_text] + handle = self.nid2id.get(gid) + if not line.data and handle is None: msg = _("Line %d: empty note was ignored.") % line.line self.__warn(msg) self.__skip_subordinate_levels(level) else: new_note = gen.lib.Note(line.data) - gid = self.nid_map[line.token_text] - handle = self.nid2id.get(gid) new_note.set_handle(handle) new_note.set_gramps_id(gid) self.dbase.add_note(new_note, self.trans)