From 67756bb8e1a66fe8966ab0986f3fe384ea43b20a Mon Sep 17 00:00:00 2001 From: =?utf8?q?Beno=C3=AEt=20Fontaine?= Date: Fri, 10 May 2024 15:37:32 +0200 Subject: [PATCH] fix memories --- getmyancestors/__init__.py | 2 +- getmyancestors/classes/tree.py | 6 ++++-- requirements.txt | 2 +- 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/getmyancestors/__init__.py b/getmyancestors/__init__.py index 315f854..79d2b16 100644 --- a/getmyancestors/__init__.py +++ b/getmyancestors/__init__.py @@ -3,4 +3,4 @@ from . import getmyancestors from . import mergemyancestors -__version__ = "1.0.5" +__version__ = "1.0.6" diff --git a/getmyancestors/classes/tree.py b/getmyancestors/classes/tree.py index 4bea414..3625193 100644 --- a/getmyancestors/classes/tree.py +++ b/getmyancestors/classes/tree.py @@ -16,6 +16,7 @@ from getmyancestors.classes.constants import ( ORDINANCES_STATUS, ) + # getmyancestors classes and functions def cont(string): """parse a GEDCOM line adding CONT and CONT tags if necessary""" @@ -367,8 +368,9 @@ class Indi: self.sources.add( (self.tree.sources[source["id"]], quotes[source["id"]]) ) - if "evidence" in data: - url = "/platform/tree/persons/%s/memories" % self.fid + for evidence in data.get("evidence", []): + memory_id, *_ = evidence["id"].partition("-") + url = "/platform/memories/memories/%s" % memory_id memorie = self.tree.fs.get_url(url) if memorie and "sourceDescriptions" in memorie: for x in memorie["sourceDescriptions"]: diff --git a/requirements.txt b/requirements.txt index e90c593..30668f8 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,4 +1,4 @@ babelfish==0.6.0 diskcache==5.2.1 -requests==2.25.1 +requests==2.31.0 fake-useragent==1.2.1 -- 2.52.0