3900: Export to Gedcom; and other living proxy None issue

svn: r15297
This commit is contained in:
Doug Blank 2010-05-01 18:51:31 +00:00
parent df32be43de
commit ba10530ead

View File

@ -186,15 +186,17 @@ def breakup(txt, limit):
# #
#------------------------------------------------------------------------- #-------------------------------------------------------------------------
def event_has_subordinate_data(event, event_ref): def event_has_subordinate_data(event, event_ref):
gotany = event.get_description().strip() or\ if event and event_ref:
not event.get_date_object().is_empty() or\ return (event.get_description().strip() or
event.get_place_handle() or\ not event.get_date_object().is_empty() or
event.get_attribute_list() or\ event.get_place_handle() or
event_ref.get_attribute_list() or\ event.get_attribute_list() or
event.get_note_list() or\ event_ref.get_attribute_list() or
event.get_source_references() or\ event.get_note_list() or
event.get_media_list() event.get_source_references() or
return gotany event.get_media_list())
else:
return False
#------------------------------------------------------------------------- #-------------------------------------------------------------------------
@ -1286,6 +1288,8 @@ class GedcomWriter(UpdateCallback):
return return
src = self.dbase.get_source_from_handle(src_handle) src = self.dbase.get_source_from_handle(src_handle)
if src is None:
return
# Reference to the source # Reference to the source
self.__writeln(level, "SOUR", "@%s@" % src.get_gramps_id()) self.__writeln(level, "SOUR", "@%s@" % src.get_gramps_id())