5708: Confusing results with statistic gramplet and filter

svn: r20026
This commit is contained in:
Doug Blank 2012-07-18 05:45:47 +00:00
parent bc381bd39a
commit 1366d3abc6

View File

@ -46,7 +46,7 @@ _YIELD_INTERVAL = 200
#------------------------------------------------------------------------ #------------------------------------------------------------------------
# #
# Gramplet class # StatsGramplet class
# #
#------------------------------------------------------------------------ #------------------------------------------------------------------------
class StatsGramplet(Gramplet): class StatsGramplet(Gramplet):
@ -103,12 +103,16 @@ class StatsGramplet(Gramplet):
with_media += 1 with_media += 1
total_media += length total_media += length
names = [person.get_primary_name()] + person.get_alternate_names() for name in [person.get_primary_name()] + person.get_alternate_names():
for name in names: if name.get_first_name().strip() == "":
if (name.get_first_name() or name.get_group_name()) == "":
incomp_names += 1 incomp_names += 1
if name.get_group_name() not in namelist: else:
namelist.append(name.get_group_name()) if name.get_surname_list():
for surname in name.get_surname_list():
if surname.get_surname().strip() == "":
incomp_names += 1
else:
incomp_names += 1
if (not person.get_main_parents_family_handle() and if (not person.get_main_parents_family_handle() and
not len(person.get_family_handle_list())): not len(person.get_family_handle_list())):
@ -193,3 +197,4 @@ class StatsGramplet(Gramplet):
'Filter', 'missing media') 'Filter', 'missing media')
self.append_text(" %s\n" % len(notfound)) self.append_text(" %s\n" % len(notfound))
self.append_text("", scroll_to="begin") self.append_text("", scroll_to="begin")