0001873: AttributeError: 'NoneType' object has no attribute 'get_gramps_id'

Fix typo in CountAncestors

svn: r10168
This commit is contained in:
Brian Matherly 2008-03-02 21:21:48 +00:00
parent 4dfb05bb06
commit d78dacb08b
3 changed files with 15 additions and 7 deletions

View File

@ -1,3 +1,8 @@
2008-03-02 Brian Matherly <brian@gramps-project.org>
* src/plugins/CmdRef.py:
0001873: AttributeError: 'NoneType' object has no attribute
'get_gramps_id'
2008-03-02 Brian Matherly <brian@gramps-project.org>
* src/plugins/AncestorTree.py:
0001876: BUG during output creation in Ancestor Tree report.

View File

@ -73,10 +73,13 @@ def _validate_options(options, dbase):
person = dbase.get_person_from_gramps_id(pid)
if not person:
person = dbase.get_default_person()
option.set_value(person.get_gramps_id())
if not person:
phandle = dbase.get_person_handles()[0]
person = dbase.get_person_from_handle(phandle)
if not person:
print "Please specify a person"
sys.exit(0)
if person:
option.set_value(person.get_gramps_id())
elif isinstance(option, PluginUtils.FamilyOption):
fid = option.get_value()

View File

@ -141,7 +141,7 @@ register_report(
modes = MODE_GUI,
translated_name = _("Number of Ancestors"),
status = _("Stable"),
description= _("Counts number of ancestors of selected person")
description = _("Counts number of ancestors of selected person"),
author_name = "Brian G. Matherly",
author_email = "brian@gramps-project.org",
)