From eb0bf91690a7796be8a8f5c452999d8aaa390f7d Mon Sep 17 00:00:00 2001 From: Brian Matherly Date: Fri, 24 Aug 2007 12:12:52 +0000 Subject: [PATCH] Implement get_default_person and get_default_handle in PrivateProxyDb.py. svn: r8858 --- ChangeLog | 4 ++++ src/GrampsDbUtils/_PrivateProxyDb.py | 11 +++++++++-- 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index 96b5263cd..44983f969 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +2007-08-24 Brian Matherly + * src/GrampsDbUtils/_PrivateProxyDb.py: Implement get_default_person and + get_default_handle + 2007-08-23 Benny Malengier * src/ExportAssistant.py: finished, new export assistant * src/ViewManager.py : delete temporary hook new export assistant diff --git a/src/GrampsDbUtils/_PrivateProxyDb.py b/src/GrampsDbUtils/_PrivateProxyDb.py index 1eb1a1e51..d794fff9f 100644 --- a/src/GrampsDbUtils/_PrivateProxyDb.py +++ b/src/GrampsDbUtils/_PrivateProxyDb.py @@ -954,11 +954,18 @@ class PrivateProxyDb: def get_default_person(self): """returns the default Person of the database""" - raise NotImplementedError + person = self.db.get_default_person() + if person and person.get_privacy() == False: + return sanitize_person(self.db,person) + return None def get_default_handle(self): """returns the default Person of the database""" - raise NotImplementedError + handle = self.db.get_default_handle() + person = self.db.get_person_from_handle(handle) + if person and person.get_privacy() == False: + return handle + return None def get_save_path(self): """returns the save path of the file, or "" if one does not exist"""