Skip to content

Commit 5a4dc5b

Browse files
committed
added missing copy(), updated DEFAULT_QUERYABLES so it contains only generic attributes
1 parent 8974c38 commit 5a4dc5b

File tree

2 files changed

+5
-25
lines changed
  • stac_fastapi
    • core/stac_fastapi/core/extensions
    • sfeos_helpers/stac_fastapi/sfeos_helpers/filter

2 files changed

+5
-25
lines changed

stac_fastapi/core/stac_fastapi/core/extensions/filter.py

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -41,24 +41,6 @@
4141
"description": "Creation Timestamp",
4242
"$ref": "https://schemas.stacspec.org/v1.0.0/item-spec/json-schema/datetime.json#/properties/updated",
4343
},
44-
"cloud_cover": {
45-
"description": "Cloud Cover",
46-
"$ref": "https://stac-extensions.github.io/eo/v1.0.0/schema.json#/definitions/fields/properties/eo:cloud_cover",
47-
},
48-
"cloud_shadow_percentage": {
49-
"title": "Cloud Shadow Percentage",
50-
"description": "Cloud Shadow Percentage",
51-
"type": "number",
52-
"minimum": 0,
53-
"maximum": 100,
54-
},
55-
"nodata_pixel_percentage": {
56-
"title": "No Data Pixel Percentage",
57-
"description": "No Data Pixel Percentage",
58-
"type": "number",
59-
"minimum": 0,
60-
"maximum": 100,
61-
},
6244
}
6345
"""Queryables that are present in all collections."""
6446

stac_fastapi/sfeos_helpers/stac_fastapi/sfeos_helpers/filter/client.py

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -49,13 +49,11 @@ async def get_queryables(
4949
if not collection_id:
5050
return queryables
5151

52-
properties: Dict[str, Any] = queryables["properties"]
53-
queryables.update(
54-
{
55-
"properties": properties,
56-
"additionalProperties": False,
57-
}
58-
)
52+
properties: Dict[str, Any] = queryables["properties"].copy()
53+
queryables.update({
54+
"properties": properties,
55+
"additionalProperties": False,
56+
})
5957

6058
mapping_data = await self.database.get_items_mapping(collection_id)
6159
mapping_properties = next(iter(mapping_data.values()))["mappings"]["properties"]

0 commit comments

Comments
 (0)