Skip to content

Commit

Permalink
account for datasets with start and end datetime but not datetime by …
Browse files Browse the repository at this point in the history
…itself (#322)
  • Loading branch information
Ariana-B authored Jan 4, 2024
1 parent ea49d65 commit 0b73e33
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions eodatasets3/stac.py
Original file line number Diff line number Diff line change
Expand Up @@ -243,8 +243,9 @@ def to_pystac_item(
properties = eo3_to_stac_properties(dataset, title=dataset.label)
properties.update(_lineage_fields(dataset.lineage))

dt = properties["datetime"]
del properties["datetime"]
dt = properties.get("datetime")
if dt is not None:
del properties["datetime"]

# TODO: choose remote if there's multiple locations?
# Without a dataset location, all paths will be relative.
Expand Down

0 comments on commit 0b73e33

Please sign in to comment.