Adds a test and a fix for the odd pagination results patched in #470.
Not quite sure what was causing the original discrepancy, but we were running two queries, one for the data, and one for the count, which made the inconsistency possible.
This PR moves the count columns into the original query, which should remove that inconsistency.
How to test
The automated tests should pass.
Running locally or in CODE, use the search bar and observe the paginationresults given back by the API. They should match the data returned.
What does this change?
Adds a test and a fix for the odd pagination results patched in #470.
Not quite sure what was causing the original discrepancy, but we were running two queries, one for the data, and one for the count, which made the inconsistency possible.
This PR moves the count columns into the original query, which should remove that inconsistency.
How to test