[FIX] update Accept header to get contributors
authorBenoît Fontaine <benoitfontaine.ba@gmail.com>
Mon, 9 Mar 2020 18:05:44 +0000 (19:05 +0100)
committerBenoît Fontaine <benoitfontaine.ba@gmail.com>
Mon, 9 Mar 2020 18:05:44 +0000 (19:05 +0100)
getmyancestors.py

index 0567176db79ba7b9696a726107f1d380944f740d..12e4626d7baa788dec8ff9adee1bafe3ddbfb3cf 100755 (executable)
@@ -653,7 +653,8 @@ class Indi:
     def get_contributors(self):
         """ retrieve contributors """
         temp = set()
-        data = self.tree.fs.get_url("/platform/tree/persons/%s/changes" % self.fid)
+        url = "/platform/tree/persons/%s/changes" % self.fid
+        data = self.tree.fs.get_url(url, {"Accept": "application/x-gedcomx-atom+json"})
         if data:
             for entries in data["entries"]:
                 for contributors in entries["contributors"]:
@@ -793,7 +794,8 @@ class Fam:
         """ retrieve contributors """
         if self.fid:
             temp = set()
-            data = self.tree.fs.get_url("/platform/tree/couple-relationships/%s/changes" % self.fid)
+            url = "/platform/tree/couple-relationships/%s/changes" % self.fid
+            data = self.tree.fs.get_url(url, {"Accept": "application/x-gedcomx-atom+json"})
             if data:
                 for entries in data["entries"]:
                     for contributors in entries["contributors"]: