Error rendering form fields for custom fields with a large number of choices #8432

Closed
opened 2025-12-29 20:36:38 +01:00 by adam · 0 comments
Owner

Originally created by @jeremystretch on GitHub (Aug 8, 2023).

Originally assigned to: @jeremystretch on GitHub.

NetBox version

v3.6-beta1

Python version

3.10

Steps to Reproduce

  1. Create a new custom field choice set, specifying UN/LOCODE as the base choice set and no extra choices.
  2. Create a selection custom field which employs this choice set for the site model. (Any model works.)
  3. Attempt to create a new site.

Expected Behavior

The site creation form should load and include the custom field. Choices for the custom field should be populated on-demand using API-backed pagination to avoid loading too much data at once.

Observed Behavior

The page either times out or takes an excessively long time to load. This is because all choices for the custom field are being included when the form is rendered.

Originally created by @jeremystretch on GitHub (Aug 8, 2023). Originally assigned to: @jeremystretch on GitHub. ### NetBox version v3.6-beta1 ### Python version 3.10 ### Steps to Reproduce 1. Create a new custom field choice set, specifying UN/LOCODE as the base choice set and no extra choices. 2. Create a selection custom field which employs this choice set for the site model. (Any model works.) 3. Attempt to create a new site. ### Expected Behavior The site creation form should load and include the custom field. Choices for the custom field should be populated on-demand using API-backed pagination to avoid loading too much data at once. ### Observed Behavior The page either times out or takes an excessively long time to load. This is because _all_ choices for the custom field are being included when the form is rendered.
adam added the type: bugstatus: acceptedbetaseverity: medium labels 2025-12-29 20:36:38 +01:00
adam closed this issue 2025-12-29 20:36:38 +01:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#8432