diff --git a/ChangeLog b/ChangeLog index 8418ea5cf..cf7423943 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +2006-05-08 Alex Roitman + * src/GrampsDb/_GrampsDbBase.py (get_default_person): Use proper + way of getting person from the handle. + 2006-05-08 Don Allingham * src/GrampsDb/_GrampsDbBase.py: get_default_handle() * src/DisplayState.py: use get_default_handle, fix race condition diff --git a/src/GrampsDb/_GrampsDbBase.py b/src/GrampsDb/_GrampsDbBase.py index 8b403f028..0fa3f520a 100644 --- a/src/GrampsDb/_GrampsDbBase.py +++ b/src/GrampsDb/_GrampsDbBase.py @@ -1518,16 +1518,11 @@ class GrampsDbBase(GrampsDBCallback): def get_default_person(self): """returns the default Person of the database""" - if self.metadata: - key = self.metadata.get('default') - data = self.person_map.get(key) - if data: - person = Person() - person.unserialize(data) - return person - elif not self.readonly: - self.metadata['default'] = None - return None + person = self.get_person_from_handle(self.get_default_handle()) + if person: + return person + elif (self.metadata) and (not self.readonly): + self.metadata['default'] = None return None def get_default_handle(self):