From 0901feda9e78746cad618b58cea3d244a9acf076 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=B4me=20Rapinat?= Date: Fri, 4 Jun 2010 13:33:22 +0000 Subject: [PATCH] #4044 #2855 #2762 fix on half relations (contribution by reinhard) svn: r15526 --- src/Relationship.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/Relationship.py b/src/Relationship.py index 5a0be7569..36f35708a 100644 --- a/src/Relationship.py +++ b/src/Relationship.py @@ -1330,6 +1330,7 @@ class RelationshipCalculator(object): all_dist=True, all_families=True, only_birth=False) if not data[0][0] == -1: + data = self.collapse_relations(data) for rel in data : rel2 = rel[2] rel4 = rel[4] @@ -1360,13 +1361,13 @@ class RelationshipCalculator(object): if not rel_str in relstrings: relstrings.append(rel_str) if rel1: - commons[rel_str] = [rel1] + commons[rel_str] = rel1 else: #unknown parent eg commons[rel_str] = [] else: if rel1: - commons[rel_str].append(rel1) + commons[rel_str].extend(rel1) #construct the return tupply, relstrings is ordered on rank automatic common_list = [] for rel_str in relstrings: