opendatacube / de_hackathon_2024

For the joint Digital Earth Australia/Antarctica/Pacific ODC hackathon, September 2024.
Apache License 2.0
0 stars 1 forks source link

Don't assume `dataset.product.id` exists when adding a new dataset #5

Open Ariana-B opened 2 months ago

Ariana-B commented 2 months ago

Dataset insertion depends on dataset.product.id to retrieve the metadata type id. But Product.id is optional and might be none, making the insert fail even if the product is valid and exists in the database. datacube.index.datasets.add should account for this and not error if the product can be found by name.