feat(backend): detalle ORCID en export y sync sin borrar datos

Enriquece obras al exportar SWORD/ZIP, pide detalle en obras nuevas (con tope), preserva campos de detalle en re-sync y desenvuelve la respuesta work de ORCID.
This commit is contained in:
Mireya Cueto Garrido
2026-05-20 12:56:02 +02:00
parent 330f0dd62b
commit 9b596af494
5 changed files with 254 additions and 22 deletions
+5 -1
View File
@@ -98,7 +98,11 @@ class ORCIDClient:
response = self._http.get(url, headers=self._headers())
if response.status_code != 200:
return None
return response.json()
payload = response.json()
# ORCID v3 devuelve el work anidado bajo la clave "work".
if isinstance(payload, dict) and "work" in payload:
return payload["work"]
return payload
# ---------------------------------------------------------
# OAuth 3-legged (authorization code)