Skip to content

Commit 18bab7c

Browse files
committed
check providers in mongo serializers
1 parent eacb1d7 commit 18bab7c

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

stac_fastapi/mongo/stac_fastapi/mongo/serializers.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,9 @@ def db_to_stac(cls, collection: dict, base_url: str) -> stac_types.Collection:
6363
if original_links:
6464
collection_links += resolve_links(original_links, base_url)
6565

66+
if "providers" not in collection:
67+
collection["providers"] = {}
68+
6669
return stac_types.Collection(
6770
type="Collection",
6871
id=collection["id"],

0 commit comments

Comments
 (0)