Skip to content

Commit

Permalink
Fix copy-paste bug in expression factory dataset timespan access.
Browse files Browse the repository at this point in the history
Aggressive error handling + __getattr__ was masking this.
  • Loading branch information
TallJimbo authored and timj committed Sep 5, 2024
1 parent ff0d8f9 commit 0cd7c5f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion python/lsst/daf/butler/queries/expression_factory.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 0cd7c5f

Please sign in to comment.