From 29ae888f83a9cecea1e2b260167f02f38417d86b Mon Sep 17 00:00:00 2001 From: Emile Sonneveld Date: Tue, 3 Sep 2024 18:22:35 +0200 Subject: [PATCH] Avoid exception when no metadata was given. Should fix openeo-geopyspark-driver. https://github.com/Open-EO/openeo-python-client/issues/612 --- openeo/rest/datacube.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/openeo/rest/datacube.py b/openeo/rest/datacube.py index f79331772..6603ffbb7 100644 --- a/openeo/rest/datacube.py +++ b/openeo/rest/datacube.py @@ -1009,7 +1009,7 @@ def aggregate_spatial( ), connection=self._connection, # TODO: also add new "geometry" dimension #457 - metadata=self.metadata.reduce_spatial(), + metadata=None if self.metadata is None else self.metadata.reduce_spatial(), ) @openeo_process