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

Pagination: incorrect next_num value when no records are returned #406

Open
mihir19 opened this issue Sep 16, 2020 · 1 comment
Open

Pagination: incorrect next_num value when no records are returned #406

mihir19 opened this issue Sep 16, 2020 · 1 comment
Labels
type: bug Something isn't working

Comments

@mihir19
Copy link

mihir19 commented Sep 16, 2020

Example:

def view_todos(page=1): paginated_todos = Todo.objects.paginate(page=page, per_page=10)

Assumption : Todo doesn't have any records in database

Result:

As page = 1, next_num=2 :

@insspb insspb added the type: bug Something isn't working label Dec 26, 2020
@MQ-xz
Copy link

MQ-xz commented Apr 10, 2023

Hey, the issue is property next_num is just incrementing the page number without validating whether its property has_next is true or false. I would like to work on this issue. Can you please assign it to me so I can get started? Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants