Skip to content

Commit 2078767

Browse files
authored
fix: avoid none in instrument property (#18)
avoid none values in the instruments array
1 parent cdb6b71 commit 2078767

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

stac_fastapi/eodag/models/stac_metadata.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,8 @@ def parse_instruments(cls, values: dict[str, Any]) -> dict[str, Any]:
9494
values["instrument"] = (
9595
",".join(instrument.split()).split(",") if isinstance(instrument, str) else instrument
9696
)
97+
if None in values["instrument"]:
98+
values["instrument"].remove(None)
9799
return values
98100

99101
@model_validator(mode="before")

0 commit comments

Comments
 (0)