* src/RelLib.py: select the lowest ID for the default person

if the default person is not set


svn: r2089
This commit is contained in:
Don Allingham 2003-09-04 03:51:58 +00:00
parent a47edf4cf0
commit 8516eb1416

View File

@ -2299,6 +2299,14 @@ class GrampsDB(Persistent):
def getDefaultPerson(self):
"""returns the default Person of the database"""
if self.default == None:
keys = self.personTable.keys()
if len(keys):
keys.sort()
return self.personMap[keys[0]]
else:
return None
else:
return self.default
def getPerson(self,id):