Skip to content

Commit

Permalink
Use query count() and explain_no_results() methods to have better rep…
Browse files Browse the repository at this point in the history
…orting
  • Loading branch information
timj committed Jul 1, 2022
1 parent 7eaef71 commit b15aecd
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions python/lsst/daf/butler/script/queryDataIds.py
Original file line number Diff line number Diff line change
Expand Up @@ -113,8 +113,8 @@ def queryDataIds(repo, dimensions, datasets, where, collections, order_by, limit
offset = None
results.limit(limit, offset)

if len(results.graph) > 0:
if results.count() > 0:
table = _Table(results)
return table.getAstropyTable(not order_by), None
else:
return None, None
return None, "\n".join(results.explain_no_results())

0 comments on commit b15aecd

Please sign in to comment.