2006-05-08 Alex Roitman <shura@gramps-project.org>
* src/GrampsDb/_GrampsDbBase.py (get_default_person): Use proper way of getting person from the handle. svn: r6592
This commit is contained in:
parent
2a7a35a259
commit
13ea348bdf
@ -1,3 +1,7 @@
|
||||
2006-05-08 Alex Roitman <shura@gramps-project.org>
|
||||
* src/GrampsDb/_GrampsDbBase.py (get_default_person): Use proper
|
||||
way of getting person from the handle.
|
||||
|
||||
2006-05-08 Don Allingham <don@gramps-project.org>
|
||||
* src/GrampsDb/_GrampsDbBase.py: get_default_handle()
|
||||
* src/DisplayState.py: use get_default_handle, fix race condition
|
||||
|
@ -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):
|
||||
|
Loading…
Reference in New Issue
Block a user