You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We are running into an issue we've had before #437. Some pagination endpoints, when called with a study filter parameter, return a number of results which does not match the total field in the json response.
This happens because certain queries (mostly when we are joining across multiple tables) return duplicate results from postgres. SqlAlchemy is smart about this and filters out the duplicates before returning the results. Our total field reflects the # of results returned by postgres and the actual length of results in the response document contains what comes out of sqlalchemy processing.
To fix this we need to add a sqlalchemy group_by call to the study filter param query:
Currently, we know this is happening with the /sequencing-centers pagination endpoint, but could be happening with others as well. We need to fix sequencing centers and then check/fix all other pagination endpoints to ensure we eliminate this issue across the board.
The text was updated successfully, but these errors were encountered:
We are running into an issue we've had before #437. Some pagination endpoints, when called with a study filter parameter, return a number of results which does not match the
total
field in the json response.This happens because certain queries (mostly when we are joining across multiple tables) return duplicate results from postgres. SqlAlchemy is smart about this and filters out the duplicates before returning the results. Our
total
field reflects the # of results returned by postgres and the actual length of results in the response document contains what comes out of sqlalchemy processing.To fix this we need to add a sqlalchemy group_by call to the study filter param query:
Currently, we know this is happening with the
/sequencing-centers
pagination endpoint, but could be happening with others as well. We need to fix sequencing centers and then check/fix all other pagination endpoints to ensure we eliminate this issue across the board.The text was updated successfully, but these errors were encountered: