Skip to content

Commit

Permalink
Remove unnecessary results variable
Browse files Browse the repository at this point in the history
  • Loading branch information
timj committed Oct 3, 2024
1 parent 81ea21c commit dfb2e2c
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions python/lsst/dax/obscore/obscore_exporter.py
Original file line number Diff line number Diff line change
Expand Up @@ -495,15 +495,13 @@ def _make_record_batches(
with self.butler.query() as query:
for where_clause in where_clauses:
if where_clause.extra_dims:
results = query.join_dimensions(where_clause.extra_dims)
else:
results = query
query = query.join_dimensions(where_clause.extra_dims)

if where_clause.where:
_LOG.verbose("Processing query with constraint %s", where_clause)
results = results.where(where_clause.where, bind=where_clause.bind)
query = query.where(where_clause.where, bind=where_clause.bind)

refs = results.datasets(dataset_type_name, collections=collections, find_first=True)
refs = query.datasets(dataset_type_name, collections=collections, find_first=True)

if not unlimited:
refs = refs.limit(query_limit)
Expand Down

0 comments on commit dfb2e2c

Please sign in to comment.