Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CollectionSerializer is duplicating "Items" link #143

Closed
ahuarte47 opened this issue Mar 9, 2023 · 5 comments
Closed

CollectionSerializer is duplicating "Items" link #143

ahuarte47 opened this issue Mar 9, 2023 · 5 comments

Comments

@ahuarte47
Copy link
Contributor

Describe the bug
db_to_stac method to transform database model to STAC collection is adding a set of links by default. "Items" link is not included in the list of inferred. So the later invoking to resolve_links adds it again because "items" passes this filter.

To Reproduce
Steps to reproduce the behavior:

  1. Uploads a Collection to ES
  2. Reads it using CollectionSerializer:db_to_stac()

Expected behavior
"Items" link should be unique. INFERRED_LINK_RELS should include "Items" or taking care of this issue in Serializer.

@jonhealy1
Copy link
Collaborator

Hi @ahuarte47 do you have a fix for this?

@ahuarte47
Copy link
Contributor Author

ahuarte47 commented Sep 2, 2023

Hi @jonhealy1 I did create any PR to fix this, I only changed my own copy of stac-fastapi including "items" in the list INFERRED_LINK_RELS, it works here. It does not seem a bug from stac-fastapi-elasticsearch, but it in combination with stac-fastapi.

@StijnCaerts
Copy link
Collaborator

I created a PR in the upstream repository: stac-utils/stac-fastapi#640

@jonhealy1
Copy link
Collaborator

Nice ok. Thank you.

@StijnCaerts
Copy link
Collaborator

#211 also fixes this, as the generated links are no longer stored in the database.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants