From e0e6791c24d5960be328c87cbad60cc63f347179 Mon Sep 17 00:00:00 2001 From: Jeremy Hooke Date: Mon, 23 May 2022 13:37:20 +1000 Subject: [PATCH] Index a location even when not embedding it. --- eodatasets3/prepare/sentinel_l1_prepare.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/eodatasets3/prepare/sentinel_l1_prepare.py b/eodatasets3/prepare/sentinel_l1_prepare.py index 858f6f3b..0e1f6cb2 100644 --- a/eodatasets3/prepare/sentinel_l1_prepare.py +++ b/eodatasets3/prepare/sentinel_l1_prepare.py @@ -26,7 +26,7 @@ from datacube.utils.uris import normalise_path from defusedxml import minidom -from eodatasets3 import DatasetDoc, DatasetPrepare, serialise +from eodatasets3 import DatasetDoc, DatasetPrepare, names, serialise from eodatasets3.properties import Eo3Interface from eodatasets3.ui import PathPath from eodatasets3.utils import pass_config @@ -248,6 +248,8 @@ def prepare_and_write( doc = serialise.from_doc( p.written_dataset_doc, skip_validation=True, normalise_properties=False ) + if not doc.locations: + doc.locations = [names.resolve_location(dataset_location)] return doc, metadata_path