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

fix pagination of search results from stac-fastapi-pgstac #232

Merged

Conversation

underchemist
Copy link
Contributor

@underchemist underchemist commented Sep 21, 2024

Resolves #231

@underchemist underchemist changed the title don't attempt to break early from pagination loop if matched is not found in search response context object fix pagination of search results Sep 21, 2024
@underchemist underchemist changed the title fix pagination of search results fix pagination of search results for stac-fastapi-pgstac Sep 21, 2024
@underchemist underchemist changed the title fix pagination of search results for stac-fastapi-pgstac fix pagination of search results from stac-fastapi-pgstac Sep 21, 2024
# Check if there is more data to fetch
if matched <= ctx["returned"]:
break
if None not in (matched, returned):
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can you explain this?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is safeguarding against comparisons between int and potential None values, as that was the original issue.

@vincentsarago vincentsarago merged commit 4923cf0 into developmentseed:main Sep 24, 2024
5 checks passed
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.

STAC backend error when API response does not contain "matched" or "found" key in context object
2 participants