diff --git a/CHANGES.md b/CHANGES.md index adb29144..ce55793a 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -2,6 +2,9 @@ ## [Unreleased] +### Changed + +- update pgstac version to `0.8.x` ## [2.5.0] - 2024-04-25 diff --git a/docker-compose.yml b/docker-compose.yml index bf79b65c..8b9f4e6b 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -45,7 +45,7 @@ services: database: container_name: stac-db - image: ghcr.io/stac-utils/pgstac:v0.7.10 + image: ghcr.io/stac-utils/pgstac:v0.8.5 environment: - POSTGRES_USER=username - POSTGRES_PASSWORD=password diff --git a/setup.py b/setup.py index 3110150e..aa400ca6 100644 --- a/setup.py +++ b/setup.py @@ -17,13 +17,13 @@ "buildpg", "brotli_asgi", "pygeofilter>=0.2", - "pypgstac==0.7.*", + "pypgstac==0.8.*", ] extra_reqs = { "dev": [ "pystac[validation]", - "pypgstac[psycopg]==0.7.*", + "pypgstac[psycopg]==0.8.*", "pytest-postgresql", "pytest", "pytest-cov", diff --git a/stac_fastapi/pgstac/core.py b/stac_fastapi/pgstac/core.py index 6301c43e..7d853b5b 100644 --- a/stac_fastapi/pgstac/core.py +++ b/stac_fastapi/pgstac/core.py @@ -226,6 +226,9 @@ async def _get_base_item(collection_id: str) -> Dict[str, Any]: for feature in collection.get("features") or []: base_item = await base_item_cache.get(feature.get("collection")) + # Exclude None values + base_item = {k: v for k, v in base_item.items() if v is not None} + feature = hydrate(base_item, feature) # Grab ids needed for links that may be removed by the fields extension. diff --git a/tests/api/test_api.py b/tests/api/test_api.py index 02460ce8..24ff1212 100644 --- a/tests/api/test_api.py +++ b/tests/api/test_api.py @@ -476,7 +476,6 @@ async def test_base_queryables(load_test_data, app_client, load_test_collection) assert q["type"] == "object" assert "properties" in q assert "id" in q["properties"] - assert "eo:cloud_cover" in q["properties"] @pytest.mark.asyncio @@ -488,7 +487,6 @@ async def test_collection_queryables(load_test_data, app_client, load_test_colle assert q["type"] == "object" assert "properties" in q assert "id" in q["properties"] - assert "eo:cloud_cover" in q["properties"] @pytest.mark.asyncio