From 8044d6f8c3a390bdef2d30146bf9c1538ac8456d Mon Sep 17 00:00:00 2001 From: Jim Bosch Date: Mon, 26 Aug 2024 13:59:01 -0400 Subject: [PATCH] Adapt to middleware-internal API changes. --- python/lsst/pipe/base/prerequisite_helpers.py | 5 +---- python/lsst/pipe/base/tests/mocks/_data_id_match.py | 2 ++ 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/python/lsst/pipe/base/prerequisite_helpers.py b/python/lsst/pipe/base/prerequisite_helpers.py index 5b6fa2888..800e0b98d 100644 --- a/python/lsst/pipe/base/prerequisite_helpers.py +++ b/python/lsst/pipe/base/prerequisite_helpers.py @@ -154,10 +154,7 @@ def __init__( self.constraint_dimensions = self.task_node.dimensions if self.lookup_function is None: for family in self.dataset_type_node.dimensions.spatial - self.task_node.dimensions.spatial: - best_spatial_element = family.choose( - self.dataset_type_node.dimensions.elements, - self.dataset_type_node.dimensions.universe, - ) + best_spatial_element = family.choose(self.dataset_type_node.dimensions) if isinstance(best_spatial_element, SkyPixDimension): self.dataset_skypix[best_spatial_element.name] = best_spatial_element else: diff --git a/python/lsst/pipe/base/tests/mocks/_data_id_match.py b/python/lsst/pipe/base/tests/mocks/_data_id_match.py index efb0b6ba4..4e6816f2c 100644 --- a/python/lsst/pipe/base/tests/mocks/_data_id_match.py +++ b/python/lsst/pipe/base/tests/mocks/_data_id_match.py @@ -171,6 +171,8 @@ def match(self, dataId: DataId) -> bool: Raised when expression includes valid but unsupported syntax, e.g. function call. """ + if self.tree is None: + return True visitor = _DataIdMatchTreeVisitor(dataId) result = self.tree.visit(visitor) if not isinstance(result, bool):