[PR #16192] [MERGED] 16173 - Fix pagination when pagination.per_page is "" #14799

Closed
opened 2025-12-29 23:26:48 +01:00 by adam · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/netbox-community/netbox/pull/16192
Author: @devon-mar
Created: 5/18/2024
Status: Merged
Merged: 5/20/2024
Merged by: @jeremystretch

Base: developHead: fix-empty-per_page


📝 Commits (1)

  • e9d2334 Fix pagination when pagination.per_page is ""

📊 Changes

1 file changed (+1 additions, -1 deletions)

View changed files

📝 netbox/utilities/paginator.py (+1 -1)

📄 Description

Fixes: #16173

Fixes TypeError when paginate.per_page user preference is "".
This happens when the user clears the per page preference which sets it to the empty string, causing
per_page to be a string instead of an integer.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/netbox-community/netbox/pull/16192 **Author:** [@devon-mar](https://github.com/devon-mar) **Created:** 5/18/2024 **Status:** ✅ Merged **Merged:** 5/20/2024 **Merged by:** [@jeremystretch](https://github.com/jeremystretch) **Base:** `develop` ← **Head:** `fix-empty-per_page` --- ### 📝 Commits (1) - [`e9d2334`](https://github.com/netbox-community/netbox/commit/e9d23349d66953024c96697d61900cdaf625a429) Fix pagination when `pagination.per_page` is `""` ### 📊 Changes **1 file changed** (+1 additions, -1 deletions) <details> <summary>View changed files</summary> 📝 `netbox/utilities/paginator.py` (+1 -1) </details> ### 📄 Description <!-- Thank you for your interest in contributing to NetBox! Please note that our contribution policy requires that a feature request or bug report be approved and assigned prior to opening a pull request. This helps avoid waste time and effort on a proposed change that we might not be able to accept. IF YOUR PULL REQUEST DOES NOT REFERENCE AN ISSUE WHICH HAS BEEN ASSIGNED TO YOU, IT WILL BE CLOSED AUTOMATICALLY. Please specify your assigned issue number on the line below. --> ### Fixes: #16173 Fixes `TypeError` when `paginate.per_page` user preference is `""`. This happens when the user clears the per page preference which sets it to the empty string, causing `per_page` to be a string instead of an integer. <!-- Please include a summary of the proposed changes below. --> --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
adam added the pull-request label 2025-12-29 23:26:48 +01:00
adam closed this issue 2025-12-29 23:26:49 +01:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#14799