4856: Gedcom import of empty note leads to invalid database
svn: r17766
This commit is contained in:
parent
abed4a7496
commit
7ff20332ac
@ -5712,14 +5712,14 @@ class GedcomParser(UpdateCallback):
|
||||
obj.add_note(new_note.get_handle())
|
||||
|
||||
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)
|
||||
|
Loading…
x
Reference in New Issue
Block a user