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

Set collection_id on search for pgstac get_item; update to pgstac 0.3.4 #270

Merged
merged 4 commits into from
Sep 23, 2021

Conversation

lossyrob
Copy link
Member

@lossyrob lossyrob commented Sep 23, 2021

Description:
This change modifies the behavior of get_item in the pgstac backend to set the collection ID. This is correct behavior - item Ids must be unique within a collection, and a collection_id is supplied in the call. Also, as mentioned in stac-utils/pgstac#58, pgstac can return incorrect results if queried with just an Item ID without the Collection ID set.

This PR also updates to pgstac 0.3.4, and fixes the NotFoundError message in get_item.

PR Checklist:

  • Code is formatted and linted (run pre-commit run --all-files)
  • Tests pass (run make test)
  • Documentation has been updated to reflect changes, if applicable, and docs build successfully (run make docs)
  • Changes are added to the CHANGELOG.

I've seen strange behavior described in
stac-utils/pgstac#58, where searching only
by an Item ID was returning the incorrect Item. Specifyng the
Collection ID, which this method should be doing, solved this in my case.
@moradology
Copy link
Collaborator

Nice to get this in before cutting the next release. Everything seems to be doing what it's supposed to, so 👍

@moradology moradology merged commit 27e1345 into master Sep 23, 2021
@lossyrob lossyrob deleted the fix/rde/pgstac-getitem branch September 23, 2021 16:11
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

Successfully merging this pull request may close these issues.

2 participants