From fd356770ced9d70037ca34695f0ab1f0ea1b7b51 Mon Sep 17 00:00:00 2001 From: Don Allingham Date: Sun, 30 Apr 2006 20:45:49 +0000 Subject: [PATCH] 2006-04-30 Don Allingham * src/RelLib/_Person.py: prevent duplicate entries in family lists svn: r6500 --- gramps2/ChangeLog | 3 +++ gramps2/src/RelLib/_Person.py | 6 ++++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/gramps2/ChangeLog b/gramps2/ChangeLog index a2a7fb42a..f924b19f0 100644 --- a/gramps2/ChangeLog +++ b/gramps2/ChangeLog @@ -1,3 +1,6 @@ +2006-04-30 Don Allingham + * src/RelLib/_Person.py: prevent duplicate entries in family lists + 2006-04-29 Don Allingham * src/Editors/_EditFamily.py: fix Select Person calls * src/docgen/Makefile.am: add ODSDoc.py diff --git a/gramps2/src/RelLib/_Person.py b/gramps2/src/RelLib/_Person.py index e2d6969e6..b8150a588 100644 --- a/gramps2/src/RelLib/_Person.py +++ b/gramps2/src/RelLib/_Person.py @@ -590,7 +590,8 @@ class Person(PrimaryObject,SourceBase,NoteBase,MediaBase, Person's L{Family} list. @type family_handle: str """ - self.family_list.append(family_handle) + if family_handle not in self.family_list: + self.family_list.append(family_handle) def set_preferred_family_handle(self, family_handle): """ @@ -691,7 +692,8 @@ class Person(PrimaryObject,SourceBase,NoteBase,MediaBase, """ if type(family_handle) not in (str ,unicode ): raise ValueError("expecting handle") - self.parent_family_list.append(family_handle) + if family_handle not in self.parent_family_list: + self.parent_family_list.append(family_handle) def clear_parent_family_handle_list(self): """