Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix pagination for 'last' page. #1074

Closed

Conversation

pcraciunoiu
Copy link
Contributor

When paginating from the end of the results, the last items were not returned correctly.

Added a test to showcase the issue.

)

list_slice_length = list_length
if max_limit is not None and "last" not in args:
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Without checking for last here and below, list_slice_length was being set to 4, and after to 0, slicing off reporters 5-8.

Query for last 2 reporters should be getting 7 and 8, but it wasn't getting those correctly.

@tcleonard
Copy link
Collaborator

I think this is the doing basically the same thing as the PR I submitted a while ago: #1046 which is still waiting to be merged

@pcraciunoiu
Copy link
Contributor Author

@tcleonard thanks for the ping! Looks great, I left a small comment there. Closing in favor of #1046.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants