0001855: BUG when running family_group report from command line (no attribute get_gramps_id)

svn: r10150
This commit is contained in:
Brian Matherly 2008-03-01 20:39:39 +00:00
parent 6ccacd27cf
commit 76d7b01103
2 changed files with 21 additions and 2 deletions

View File

@ -1,3 +1,8 @@
2008-02-26 Brian Matherly <brian@gramps-project.org>
* src/ReportBase/_CommandLineReport.py:
0001855: BUG when running family_group report from command line
(no attribute get_gramps_id)
2008-02-28 Jim Sack <jgsack@san.rr.com> 2008-02-28 Jim Sack <jgsack@san.rr.com>
* src/GrampsDbUtils/test/ged_skip_notes_test.py: add unittest * src/GrampsDbUtils/test/ged_skip_notes_test.py: add unittest
for empty notes and skipped subordinate blocks (#1851) for empty notes and skipped subordinate blocks (#1851)

View File

@ -240,8 +240,22 @@ class CommandLineReport:
elif isinstance(option, PluginUtils.FamilyOption): elif isinstance(option, PluginUtils.FamilyOption):
id_list = [] id_list = []
for fhandle in self.database.get_family_handles(): for fhandle in self.database.get_family_handles():
family = self.database.get_person_from_handle(fhandle) family = self.database.get_family_from_handle(fhandle)
id_list.append(family.get_gramps_id()) mname = ""
fname = ""
mhandle = family.get_mother_handle()
if mhandle:
mother = self.database.get_person_from_handle(mhandle)
if mother:
mname = name_displayer.display(mother)
fhandle = family.get_father_handle()
if fhandle:
father = self.database.get_person_from_handle(fhandle)
if father:
fname = name_displayer.display(father)
text = "%s:\t%s, %s" % \
(family.get_gramps_id(), fname, mname)
id_list.append(text)
self.options_help[name].append(id_list) self.options_help[name].append(id_list)
self.options_help[name].append(False) self.options_help[name].append(False)
elif isinstance(option, PluginUtils.NoteOption): elif isinstance(option, PluginUtils.NoteOption):