From d7f2a858be01bb58dc2cbcf57fa5644b623b5673 Mon Sep 17 00:00:00 2001 From: Gary Burton Date: Tue, 16 Dec 2008 21:54:10 +0000 Subject: [PATCH] Gedcom compliance. Bug #2558: Further fix for when a media note is not present. svn: r11485 --- src/GrampsDbUtils/_GedcomParse.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/GrampsDbUtils/_GedcomParse.py b/src/GrampsDbUtils/_GedcomParse.py index 3bbb25538..66135d11e 100644 --- a/src/GrampsDbUtils/_GedcomParse.py +++ b/src/GrampsDbUtils/_GedcomParse.py @@ -4310,7 +4310,8 @@ class GedcomParser(UpdateCallback): photo = self.dbase.get_object_from_handle(photo_handle) oref = gen.lib.MediaRef() oref.set_reference_handle(photo.handle) - oref.add_note(self.__find_note_handle(self.nid_map[note])) + if note: + oref.add_note(self.__find_note_handle(self.nid_map[note])) obj.add_media_reference(oref) def __build_event_pair(self, state, event_type, event_map, description):