MAX_PAGE_SIZE not being enforced if "limit" query param is missing #10537

Closed
opened 2025-12-29 21:32:50 +01:00 by adam · 0 comments
Owner

Originally created by @bctiemann on GitHub (Dec 3, 2024).

Originally assigned to: @bctiemann on GitHub.

Deployment Type

Self-hosted

Triage priority

I volunteer to perform this work (if approved)

NetBox Version

v4.1.7

Python Version

3.10

Steps to Reproduce

Set MAX_PAGE_SIZE to a small number (such as 30) in configuration.py
Access http://127.0.0.1:8000/api/dcim/interfaces/

Expected Behavior

Results should be paginated by 30, and next and previous links should have correct limit and offset values corresponding to increments of 30

Observed Behavior

The page size defaults to PAGINATE_COUNT (default 50); and the next url has limit and offset values corresponding to 50. However if you follow that link, the results are paginated by 30, as are the next and previous urls.

Originally created by @bctiemann on GitHub (Dec 3, 2024). Originally assigned to: @bctiemann on GitHub. ### Deployment Type Self-hosted ### Triage priority I volunteer to perform this work (if approved) ### NetBox Version v4.1.7 ### Python Version 3.10 ### Steps to Reproduce Set MAX_PAGE_SIZE to a small number (such as 30) in `configuration.py` Access http://127.0.0.1:8000/api/dcim/interfaces/ ### Expected Behavior Results should be paginated by 30, and `next` and `previous` links should have correct `limit` and `offset` values corresponding to increments of 30 ### Observed Behavior The page size defaults to `PAGINATE_COUNT` (default 50); and the `next` url has `limit` and `offset` values corresponding to 50. However if you follow that link, the results are paginated by 30, as are the `next` and `previous` urls.
adam added the type: bugstatus: acceptedseverity: low labels 2025-12-29 21:32:50 +01:00
adam closed this issue 2025-12-29 21:32:50 +01:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#10537