Removed .get_base_db() method as there was already basedb for the same purpose
svn: r15484
This commit is contained in:
parent
8f9970839b
commit
8a25a77c9f
@ -816,9 +816,9 @@ def probably_alive(person, db,
|
||||
:param max_age_prob_alive: maximum age of a person, in years
|
||||
:param avg_generation_gap: average generation gap, in years
|
||||
"""
|
||||
# First, find the real database to use all people
|
||||
# First, get the real database to use all people
|
||||
# for determining alive status:
|
||||
basedb = db.get_base_db()
|
||||
basedb = db.basedb
|
||||
# Now, we create a wrapper for doing work:
|
||||
pb = ProbablyAlive(basedb, max_sib_age_diff,
|
||||
max_age_prob_alive,
|
||||
|
@ -53,6 +53,7 @@ class DbReadBase(object):
|
||||
A new DbReadBase class should never be directly created. Only classes
|
||||
derived from this class should be created.
|
||||
"""
|
||||
self.basedb = self
|
||||
|
||||
def all_handles(self, table):
|
||||
"""
|
||||
|
@ -1466,8 +1466,3 @@ class DbBsddbRead(DbReadBase, Callback):
|
||||
"""
|
||||
return self._bm_changes > 0
|
||||
|
||||
def get_base_db(self):
|
||||
"""
|
||||
Return the base database.
|
||||
"""
|
||||
return self
|
||||
|
@ -723,11 +723,3 @@ class ProxyDbBase(DbReadBase):
|
||||
"""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
|
||||
|
@ -74,28 +74,28 @@ def run(database, document, filter_name, *args, **kwargs):
|
||||
stab.columns(_("Object"), _("Count/Total"))
|
||||
stab.row([_("People"), "Filter", "all people"],
|
||||
"%d/%d" % (len(database.get_person_handles()),
|
||||
len(database.get_base_db().get_person_handles())))
|
||||
len(database.basedb.get_person_handles())))
|
||||
stab.row([_("Families"), "Filter", "all families"],
|
||||
"%d/%d" % (len(database.get_family_handles()),
|
||||
len(database.get_base_db().get_family_handles())))
|
||||
len(database.basedb.get_family_handles())))
|
||||
stab.row([_("Events"), "Filter", "all events"],
|
||||
"%d/%d" % (len(database.get_event_handles()),
|
||||
len(database.get_base_db().get_event_handles())))
|
||||
len(database.basedb.get_event_handles())))
|
||||
stab.row([_("Places"), "Filter", "all places"],
|
||||
"%d/%d" % (len(database.get_place_handles()),
|
||||
len(database.get_base_db().get_place_handles())))
|
||||
len(database.basedb.get_place_handles())))
|
||||
stab.row([_("Sources"), "Filter", "all sources"],
|
||||
"%d/%d" % (len(database.get_source_handles()),
|
||||
len(database.get_base_db().get_source_handles())))
|
||||
len(database.basedb.get_source_handles())))
|
||||
stab.row([_("Repositories"), "Filter", "all repositories"],
|
||||
"%d/%d" % (len(database.get_repository_handles()),
|
||||
len(database.get_base_db().get_repository_handles())))
|
||||
len(database.basedb.get_repository_handles())))
|
||||
stab.row([_("Media"), "Filter", "all media"],
|
||||
"%d/%d" % (len(database.get_media_object_handles()),
|
||||
len(database.get_base_db().get_media_object_handles())))
|
||||
len(database.basedb.get_media_object_handles())))
|
||||
stab.row([_("Notes"), "Filter", "all notes"],
|
||||
"%d/%d" % (len(database.get_note_handles()),
|
||||
len(database.get_base_db().get_note_handles())))
|
||||
len(database.basedb.get_note_handles())))
|
||||
sdoc.paragraph("")
|
||||
stab.write(sdoc)
|
||||
return
|
||||
|
Loading…
Reference in New Issue
Block a user