From 5560a4f62c40bc0db8ca53a7df025e1ea9a31f9a Mon Sep 17 00:00:00 2001 From: Doug Blank Date: Tue, 30 Dec 2008 14:14:37 +0000 Subject: [PATCH] =?UTF-8?q?Fix=20for=20using=20only=20birth=20relations,?= =?UTF-8?q?=20by=20Reinhard=20M=C3=BCller?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit svn: r11537 --- src/plugins/Records.py | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/src/plugins/Records.py b/src/plugins/Records.py index d271f1684..034292a96 100644 --- a/src/plugins/Records.py +++ b/src/plugins/Records.py @@ -33,7 +33,7 @@ import datetime # GRAMPS modules # #------------------------------------------------------------------------ -from gen.lib import Date, EventType, Name +from gen.lib import ChildRefType, Date, EventType, Name import BaseDoc from BasicUtils import name_displayer from DataViews import register, Gramplet @@ -143,6 +143,15 @@ def _find_records(db, filter, callname): name, 'Person', person_handle) for child_ref in family.get_child_ref_list(): + if person.get_gender() == person.MALE: + relation = child_ref.get_father_relation() + elif person.get_gender() == person.FEMALE: + relation = child_ref.get_mother_relation() + else: + continue + if relation != ChildRefType.BIRTH: + continue + child = db.get_person_from_handle(child_ref.ref) child_birth_ref = child.get_birth_ref()