Skip to content

Commit

Permalink
fixed offset calculation
Browse files Browse the repository at this point in the history
  • Loading branch information
daniel-sanche committed Aug 7, 2024
1 parent 175c76a commit c5d8a76
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions google/cloud/datastore/query.py
Original file line number Diff line number Diff line change
Expand Up @@ -833,8 +833,8 @@ def _next_page(self):
# more than 1000 skipped results in a query.
new_query_pb = query_pb2.Query()
new_query_pb._pb.CopyFrom(request["query"]._pb) # copy for testability
new_query_pb.start_cursor = response_pb.batch.skipped_cursor
new_query_pb.offset -= response_pb.batch.end_cursor
new_query_pb.start_cursor = response_pb.batch.end_cursor
new_query_pb.offset -= response_pb.batch.skipped_results
request["query"] = new_query_pb

response_pb = self.client._datastore_api.run_query(
Expand Down

0 comments on commit c5d8a76

Please sign in to comment.