Skip to content

Commit

Permalink
Ignore offsets when performing MongoDB count query
Browse files Browse the repository at this point in the history
  • Loading branch information
ml-evs committed May 6, 2022
1 parent 66b528e commit 2382194
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions optimade/server/entry_collections/mongo.py
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,7 @@ def _run_db_query(
if not single_entry:
criteria_nolimit = criteria.copy()
criteria_nolimit.pop("limit", None)
criteria_nolimit.pop("skip", None)
data_returned = self.count(**criteria_nolimit)
more_data_available = nresults_now < data_returned
else:
Expand Down

0 comments on commit 2382194

Please sign in to comment.