diff --git a/ChangeLog b/ChangeLog index 34b6d2647..3e947ca29 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2008-02-26 Brian Matherly + * src/ReportBase/_CommandLineReport.py: + 0001855: BUG when running family_group report from command line + (no attribute get_gramps_id) + 2008-02-28 Jim Sack * src/GrampsDbUtils/test/ged_skip_notes_test.py: add unittest for empty notes and skipped subordinate blocks (#1851) diff --git a/src/ReportBase/_CommandLineReport.py b/src/ReportBase/_CommandLineReport.py index 87e338050..ced6dfe6f 100644 --- a/src/ReportBase/_CommandLineReport.py +++ b/src/ReportBase/_CommandLineReport.py @@ -240,8 +240,22 @@ class CommandLineReport: elif isinstance(option, PluginUtils.FamilyOption): id_list = [] for fhandle in self.database.get_family_handles(): - family = self.database.get_person_from_handle(fhandle) - id_list.append(family.get_gramps_id()) + family = self.database.get_family_from_handle(fhandle) + 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(False) elif isinstance(option, PluginUtils.NoteOption):