Skip to content

Commit

Permalink
Correct @id return value from r_navigation
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
sonofmun authored May 15, 2024
1 parent cf17ffa commit 8df98c1
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion capitains_nautilus/apis/dts.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit 8df98c1

Please sign in to comment.