Skip to content

Commit

Permalink
fix log error erroneously appearing when query has zero total hits
Browse files Browse the repository at this point in the history
  • Loading branch information
alexdunnjpl committed Sep 12, 2023
1 parent 9910afb commit 81cb14a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/pds/registrysweepers/utils/db/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ def fetch_func(_scroll_id: str = scroll_id):
# expected total hits value.
# TODO: Remove this upon implementation of https://github.com/NASA-PDS/registry-sweepers/issues/42
hits_data_present_in_response = len(response_hits) > 0
if not hits_data_present_in_response:
if not hits_data_present_in_response and served_hits < total_hits:
log.error(
f"Response for query {query_id} contained no hits when hits were expected. Returned data is incomplete (got {served_hits} of {total_hits} total hits). Response was: {results}"
)
Expand Down

0 comments on commit 81cb14a

Please sign in to comment.