From ba10530ead24c9b5314b7344582b3506248af3bd Mon Sep 17 00:00:00 2001 From: Doug Blank Date: Sat, 1 May 2010 18:51:31 +0000 Subject: [PATCH] 3900: Export to Gedcom; and other living proxy None issue svn: r15297 --- src/plugins/export/ExportGedcom.py | 22 +++++++++++++--------- 1 file changed, 13 insertions(+), 9 deletions(-) diff --git a/src/plugins/export/ExportGedcom.py b/src/plugins/export/ExportGedcom.py index ef5ce46e5..d002fac13 100644 --- a/src/plugins/export/ExportGedcom.py +++ b/src/plugins/export/ExportGedcom.py @@ -186,15 +186,17 @@ def breakup(txt, limit): # #------------------------------------------------------------------------- def event_has_subordinate_data(event, event_ref): - gotany = event.get_description().strip() or\ - not event.get_date_object().is_empty() or\ - event.get_place_handle() or\ - event.get_attribute_list() or\ - event_ref.get_attribute_list() or\ - event.get_note_list() or\ - event.get_source_references() or\ - event.get_media_list() - return gotany + if event and event_ref: + return (event.get_description().strip() or + not event.get_date_object().is_empty() or + event.get_place_handle() or + event.get_attribute_list() or + event_ref.get_attribute_list() or + event.get_note_list() or + event.get_source_references() or + event.get_media_list()) + else: + return False #------------------------------------------------------------------------- @@ -1286,6 +1288,8 @@ class GedcomWriter(UpdateCallback): return src = self.dbase.get_source_from_handle(src_handle) + if src is None: + return # Reference to the source self.__writeln(level, "SOUR", "@%s@" % src.get_gramps_id())