[WIP] preserve predefined links for item responses (#941)

* preserve predefined links for item responses

* Update api.py
This commit is contained in:
Tom Kralidis
2022-07-20 13:11:18 -04:00
committed by GitHub
parent 08f3380b6f
commit 3490b5e18d
+5 -2
View File
@@ -1912,7 +1912,10 @@ class API:
'{}/{}/items/{}'.format(
self.get_collections_url(), dataset, identifier)
content['links'] = [{
if 'links' not in content:
content['links'] = []
content['links'].extend([{
'rel': request.get_linkrel(F_JSON),
'type': 'application/geo+json',
'title': 'This document as GeoJSON',
@@ -1934,7 +1937,7 @@ class API:
request.locale),
'href': '{}/{}'.format(
self.get_collections_url(), dataset)
}]
}])
if 'prev' in content:
content['links'].append({