* src/GrampsDb/_ReadXML.py (start_eventref): Only set birth and

death references for events with primary role.


svn: r6867
This commit is contained in:
Alex Roitman 2006-06-06 18:53:55 +00:00
parent c1f1b1723a
commit 8e06592375
2 changed files with 4 additions and 0 deletions

View File

@ -1,4 +1,6 @@
2006-06-06 Alex Roitman <shura@gramps-project.org>
* 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.

View File

@ -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: