method for getting base database, if a proxy

svn: r15465
This commit is contained in:
Doug Blank 2010-05-23 15:44:51 +00:00
parent a3a12e87fe
commit a69337b6c6
2 changed files with 14 additions and 0 deletions

View File

@ -1466,3 +1466,8 @@ class DbBsddbRead(DbReadBase, Callback):
"""
return self._bm_changes > 0
def get_base_db(self):
"""
Return the base database.
"""
return self

View File

@ -722,3 +722,12 @@ class ProxyDbBase(DbReadBase):
def get_note_bookmarks(self):
"""returns the list of Note handles in the bookmarks"""
return self.note_bookmarks
def get_base_db(self):
"""
Return the base database.
"""
basedb = self
while isinstance(basedb, ProxyDbBase):
basedb = basedb.db
return basedb