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

PgSTAC: Fields "include" fails if collection not included #3

Open
duckontheweb opened this issue Aug 6, 2022 · 0 comments
Open

PgSTAC: Fields "include" fails if collection not included #3

duckontheweb opened this issue Aug 6, 2022 · 0 comments

Comments

@duckontheweb
Copy link
Contributor

Ported from stac-utils/stac-fastapi#394.

Original Issue:

See comment here: https://github.com/stac-utils/stac-fastapi/blob/81015a153c1d9f36d8e12f17a1bf67370396f472/stac_fastapi/pgstac/stac_fastapi/pgstac/core.py#L152

When using a fields "includes" list that doesn't include collection, an exception is thrown (e.g. {"fields": {"include": ["id"]}}). This is because pgstac doesn't return a collection, and the ItemLinks logic requires it be present.

One option is always to pass collection to pgstac, but then drop it if it's not in fields.include.

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

1 participant