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

API next json key loops on itself with MAX_PAGE_SIZE=0 and limit=0 #2442

Closed
aruhier opened this issue Sep 18, 2018 · 1 comment
Closed

API next json key loops on itself with MAX_PAGE_SIZE=0 and limit=0 #2442

aruhier opened this issue Sep 18, 2018 · 1 comment
Labels
status: accepted This issue has been accepted for implementation type: bug A confirmed report of unexpected behavior in the application

Comments

@aruhier
Copy link
Contributor

aruhier commented Sep 18, 2018

Environment

  • Python version: 3.7
  • NetBox version: 2.4.4

Steps to Reproduce

Set MAX_PAGE_SIZE=0 to disable the pagination, and do a GET on a list of items (/api/dcim/devices/ for example) with the GET parameter limit=0.

Expected Behavior

The next value in the response should be null, as the pagination is disabled.

Observed Behavior

The next is looping on the same GET query, with limit=0&offset=0 (/api/dcim/devices/?limit=0&offset=0 for example). It is an issue for some API clients that just loop over the next key until it is null.

@jeremystretch jeremystretch added type: bug A confirmed report of unexpected behavior in the application status: accepted This issue has been accepted for implementation labels Sep 18, 2018
@aruhier
Copy link
Contributor Author

aruhier commented Sep 18, 2018

Thanks a lot!

@lock lock bot locked as resolved and limited conversation to collaborators Jan 17, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
status: accepted This issue has been accepted for implementation type: bug A confirmed report of unexpected behavior in the application
Projects
None yet
Development

No branches or pull requests

2 participants