[x] Added tests for code changes or test/build only changes
[x] Updated the change log file (CHANGES.md) or test/build only changes
[x] Completed the PR template below:
Description
When querying a grouped view where either a) there's more documents than the default page size or b) there's more documents that the user-defined page size option, a KeyError occurs. This happens when the view data iteration logic tries to retrieve the next set of results.
When querying a grouped view where pagination is needed, a KeyError occurs when trying to grab the next page. This error is happening because the iteration logic is expecting an id field which does not exist for grouped view results.
Checklist
CHANGES.md
) or test/build only changesDescription
When querying a grouped view where either a) there's more documents than the default page size or b) there's more documents that the user-defined page size option, a
KeyError
occurs. This happens when the view data iteration logic tries to retrieve the next set of results.When querying a grouped view where pagination is needed, a
KeyError
occurs when trying to grab the next page. This error is happening because the iteration logic is expecting anid
field which does not exist for grouped view results.fixes #456
Approach
Update line 400 in
cloudant/result.py
to check that theid
field exists.Schema & API Changes
Security and Privacy
Testing
Added new test
DatabaseTests.test_retrieve_grouped_view_result_with_page_size
.Monitoring and Logging