-
Notifications
You must be signed in to change notification settings - Fork 30
Closed
Description
Describe the bug
The links on Item and Collection objects are overwritten before persisting them in the database.
For Items, the links are overwritten in the ItemSerializer.stac_to_db()
method:
stac-fastapi-elasticsearch-opensearch/stac_fastapi/core/stac_fastapi/core/serializers.py
Line 68 in 0c7cfcd
stac_data["links"] = item_links |
For Collections, the links are overwritten in the TransactionsClient
itself:
stac-fastapi-elasticsearch-opensearch/stac_fastapi/core/stac_fastapi/core/core.py
Line 737 in 0c7cfcd
collection["links"] = collection_links |
To Reproduce
Steps to reproduce the behavior:
- Create collection with links, eg.
rel=license
- Links are overwritten and the original links cannot be retrieved again when requesting the collection. They are also not persisted in the database.
Expected behavior
- Filter out
INFERRED_LINK_RELS
, store remaining links in the database - Inferred links are added again when loading objects from database
Metadata
Metadata
Assignees
Labels
No labels