From f7968c096c8e7fdca830d8e3647e651454ac4f9e Mon Sep 17 00:00:00 2001 From: =?utf8?q?Beno=C3=AEt=20Fontaine?= Date: Tue, 5 Nov 2019 19:35:32 +0100 Subject: [PATCH] Update following FamilySearch's last update Replace "father" key with "parent1" and "mother" with "parent2" --- getmyancestors.py | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/getmyancestors.py b/getmyancestors.py index c8a0ee9..ff9b5a3 100755 --- a/getmyancestors.py +++ b/getmyancestors.py @@ -529,7 +529,8 @@ class Indi: self.parents = set() self.spouses = set() self.children = set() - self.baptism = self.confirmation = self.initiatory = self.endowment = self.sealing_child = None + self.baptism = self.confirmation = self.initiatory = None + self.endowment = self.sealing_child = None self.nicknames = set() self.facts = set() self.birthnames = set() @@ -639,8 +640,8 @@ class Indi: self.endowment = Ordinance(o) elif o["type"] == "http://lds.org/SealingChildToParents": self.sealing_child = Ordinance(o) - if "father" in o and "mother" in o: - famc = (o["father"]["resourceId"], o["mother"]["resourceId"]) + if "parent1" in o and "parent2" in o: + famc = (o["parent1"]["resourceId"], o["parent2"]["resourceId"]) elif o["type"] == "http://lds.org/SealingToSpouse": res.append(o) return res, famc @@ -877,8 +878,8 @@ class Tree: loop.run_until_complete(add_datas(loop, data)) if "childAndParentsRelationships" in data: for rel in data["childAndParentsRelationships"]: - father = rel["father"]["resourceId"] if "father" in rel else None - mother = rel["mother"]["resourceId"] if "mother" in rel else None + father = rel["parent1"]["resourceId"] if "parent1" in rel else None + mother = rel["parent2"]["resourceId"] if "parent2" in rel else None child = rel["child"]["resourceId"] if "child" in rel else None if child in self.indi: self.indi[child].parents.add((father, mother)) -- 2.52.0