* src/GrampsDb/_GrampsBSDDB.py (gramps_upgrade_9): Convert upgrade

to using new birth/death reference approach.
	* src/GrampsDb/_GrampsDbBase.py (commit_person): Simplify updating
	of the custom event roles.
	* src/GrampsDb/_WriteXML.py (write_person): Use methods to get
	birth/death ref, not raw attributes.
	* src/RelLib/_Person.py: Convert to using birth and death ref
	indices.
	birth/deat reference; use methods to get birth/death ref, not raw
	attributes.


svn: r6762
This commit is contained in:
Alex Roitman
2006-05-23 19:55:35 +00:00
parent b2e8acc59d
commit 9e45d663b6
6 changed files with 79 additions and 107 deletions

View File

@@ -453,12 +453,9 @@ class GrampsDbBase(GrampsDBCallback):
if person.marker.is_custom():
self.marker_names.add(str(person.marker))
eref_list = [eref for eref in (person.event_ref_list
+ [person.birth_ref,person.death_ref])
if eref]
self.event_role_names.update(
[str(eref.role) for eref in eref_list if eref.role.is_custom()])
self.event_role_names.update([str(eref.role)
for eref in person.event_ref_list
if eref.role.is_custom()])
self.name_types.update([str(name.type)
for name in ([person.primary_name]