From 0cd7c5f181d35d5d96dac921edd4d10de73638ec Mon Sep 17 00:00:00 2001 From: Jim Bosch Date: Thu, 22 Aug 2024 12:43:03 -0400 Subject: [PATCH] Fix copy-paste bug in expression factory dataset timespan access. Aggressive error handling + __getattr__ was masking this. --- python/lsst/daf/butler/queries/expression_factory.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/python/lsst/daf/butler/queries/expression_factory.py b/python/lsst/daf/butler/queries/expression_factory.py index 3f198eaf01..a55504f2b3 100644 --- a/python/lsst/daf/butler/queries/expression_factory.py +++ b/python/lsst/daf/butler/queries/expression_factory.py @@ -471,7 +471,7 @@ def __getattr__(self, field: str) -> ScalarExpressionProxy: @property def timespan(self) -> TimespanProxy: try: - expression = tree.DimensionFieldReference(element=self._element, field="timespan") + expression = tree.DatasetFieldReference(dataset_type=self._dataset_type, field="timespan") except InvalidQueryError: raise AttributeError("timespan") return TimespanProxy(expression)