From c2dccd3f433133dea4e6064a9f9270706c14d47a Mon Sep 17 00:00:00 2001 From: naath Date: Sun, 30 Mar 2014 13:49:12 +0100 Subject: [PATCH] removed trailing great^n grand parent line from ancestor description --- familyTree/askQuestion.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/familyTree/askQuestion.py b/familyTree/askQuestion.py index 7018503..e707f64 100755 --- a/familyTree/askQuestion.py +++ b/familyTree/askQuestion.py @@ -159,16 +159,18 @@ def all_ancestors(personID,newLine): while len(ancestors)>0: level = level+1 newA =[] - out = out+newLine + parent_level(level,'parent') +':' + newLine + thisout = newLine + parent_level(level,'parent') +':' + newLine for ancestor in ancestors: id = (ancestor,) for row in run_query(s,id): - out = out + name_html(row,newLine)+newLine + thisout = thisout + name_html(row,newLine)+newLine if row[1] not in allAncestors and is_number(row[1])!=0: newA.append(row[1]) allAncestors.append(row[1]) trackLevel.append(level) ancestors = newA + if len(ancestors)>0: + out = out+thisout return [out, allAncestors,trackLevel] -- 2.30.2