You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The logic in stac_fastapi.pgstac.models.links.BaseLinks.get_links uses some implicit naming to gather link via subclass naming conventions. However, if link_* methods return (which the PaginationLinks.link_next or link_prev can despite their type declarations), this can end up with None in this link and therefore null in the eventual response.
Fix is to filter for Nones in the linked method.
I think there's not enough logic in these models to warrant a implicit method-naming trick like this, and took me a good bit of time to track down the cause of this, so I'd also recommend a refactor that uses a more straightforward approach.
The text was updated successfully, but these errors were encountered:
The logic in stac_fastapi.pgstac.models.links.BaseLinks.get_links uses some implicit naming to gather link via subclass naming conventions. However, if
link_*
methods return (which the PaginationLinks.link_next or link_prev can despite their type declarations), this can end up withNone
in this link and thereforenull
in the eventual response.Fix is to filter for Nones in the linked method.
I think there's not enough logic in these models to warrant a implicit method-naming trick like this, and took me a good bit of time to track down the cause of this, so I'd also recommend a refactor that uses a more straightforward approach.
The text was updated successfully, but these errors were encountered: