diff --git a/datacube/index/memory/_products.py b/datacube/index/memory/_products.py index fffa2ae96..78df07d7d 100644 --- a/datacube/index/memory/_products.py +++ b/datacube/index/memory/_products.py @@ -36,7 +36,7 @@ def add(self, product: Product, allow_table_lock: bool = False) -> Product: f'Metadata Type {product.name}' ) else: - mdt = self.metadata_type_resource.get_by_name(product.metadata_type.name) + mdt = self._index.metadata_types.get_by_name(product.metadata_type.name) if mdt is None: _LOG.warning(f'Adding metadata_type "{product.metadata_type.name}" as it doesn\'t exist') product.metadata_type = self._index.metadata_types.add(product.metadata_type, diff --git a/docs/about/whats_new.rst b/docs/about/whats_new.rst index 1b0a18666..ae222ab08 100644 --- a/docs/about/whats_new.rst +++ b/docs/about/whats_new.rst @@ -31,6 +31,7 @@ v1.9.next - EP13 API changes to metadata and product resources. (:pull:`1536`) - Phase 1 of EP13 API changes to dataset resource - get_unsafe, get_derived, temporal_extent. (:pull:`1538`) - Add product argument to spatial_extent method, as per EP13. (:pull:`1539`) +- Index driver API type hint cleanup. (:pull:`1540`) v1.8.next