From 8df98c12ab2e629c3debcae8a868059f385f6bc9 Mon Sep 17 00:00:00 2001 From: Matthew Munson Date: Wed, 15 May 2024 15:28:49 +0200 Subject: [PATCH] Correct @id return value from r_navigation The `@id` key in the response from r_navigation is actually the url path to the current navigation request. Here I have changed the return for `@id` to the objectId and moved the url path that was in `@id` to a new `dts:references` key. This seems to make more sense to me but perhaps it doesn't conform to the standard. --- capitains_nautilus/apis/dts.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/capitains_nautilus/apis/dts.py b/capitains_nautilus/apis/dts.py index 4e3b584..d126d01 100644 --- a/capitains_nautilus/apis/dts.py +++ b/capitains_nautilus/apis/dts.py @@ -469,7 +469,8 @@ def r_dts_navigation(self, objectId=None, passageId=None, start=None, end=None, }, "level": references.level, "passage": url_for(".dts_document", id=objectId, _external=self._external)+"{&ref}{&start}{&end}", - "@id": url_for(".dts_navigation", **params), + "@id": objectId, + "dts:references": url_for(".dts_navigation", **params), "hydra:member": [_ref_to_dict(ref) for ref in references] } if references.citation: