#2644: Do not export individual events without primary role

svn: r16032
This commit is contained in:
Jérôme Rapinat 2010-10-24 07:25:14 +00:00
parent 6a92211c4b
commit 36f70bed44

View File

@ -556,6 +556,12 @@ class GedcomWriter(UpdateCallback):
# if the event is a birth or death, skip it. # if the event is a birth or death, skip it.
if etype in (gen.lib.EventType.BIRTH, gen.lib.EventType.DEATH): if etype in (gen.lib.EventType.BIRTH, gen.lib.EventType.DEATH):
continue continue
role = int(event_ref.get_role())
# if the event role is not primary, skip the event.
if role != gen.lib.EventRoleType.PRIMARY:
continue
val = libgedcom.personalConstantEvents.get(etype, "").strip() val = libgedcom.personalConstantEvents.get(etype, "").strip()