From 824bcfb0bd11af33722a1a25f8b82b7d07d38c24 Mon Sep 17 00:00:00 2001 From: Alex Roitman Date: Tue, 6 Jun 2006 18:53:55 +0000 Subject: [PATCH] * src/GrampsDb/_ReadXML.py (start_eventref): Only set birth and death references for events with primary role. svn: r6867 --- gramps2/ChangeLog | 2 ++ gramps2/src/GrampsDb/_ReadXML.py | 2 ++ 2 files changed, 4 insertions(+) diff --git a/gramps2/ChangeLog b/gramps2/ChangeLog index a0640df6d..c69ea0a8b 100644 --- a/gramps2/ChangeLog +++ b/gramps2/ChangeLog @@ -1,4 +1,6 @@ 2006-06-06 Alex Roitman + * src/GrampsDb/_ReadXML.py (start_eventref): Only set birth and + death references for events with primary role. * src/GrampsDb/_DbUtils.py (set_birth_death_index): Only set birth and death references for events with primary role. diff --git a/gramps2/src/GrampsDb/_ReadXML.py b/gramps2/src/GrampsDb/_ReadXML.py index 5c7484e76..f3bdc919f 100644 --- a/gramps2/src/GrampsDb/_ReadXML.py +++ b/gramps2/src/GrampsDb/_ReadXML.py @@ -770,9 +770,11 @@ class GrampsParser(UpdateCallback): elif self.person: event.personal = True if (event.type == RelLib.EventType.BIRTH) \ + and (self.eventref.role == RelLib.EventRoleType.PRIMARY) \ and (self.person.get_birth_ref() == None): self.person.set_birth_ref(self.eventref) elif (event.type == RelLib.EventType.DEATH) \ + and (self.eventref.role == RelLib.EventRoleType.PRIMARY) \ and (self.person.get_death_ref() == None): self.person.set_death_ref(self.eventref) else: