Bulk import throws exception when certain custom field attributes are defined #10999

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

Originally created by @atownson on GitHub (Apr 8, 2025).

Originally assigned to: @jnovinger on GitHub.

Deployment Type

NetBox Cloud

NetBox Version

v4.2.6

Python Version

3.12

Steps to Reproduce

  1. Add a custom field named "my_cf_field" to the model Site (or any other model) of Type "Multiple object" - set as not required, enter [1,2] as the Default value, and set Related object type to Region (or any other model).
  2. Ensure that at least 2 Regions exist (with IDs of 1 and 2) - to populate the default values
  3. Attempt to bulk import a Site with the following payload:
name,slug,status
My Site,my-site,active

Expected Behavior

The site is created and the custom field "my_cf_field" is set to the default of Regions with IDs 1 and 2.

Observed Behavior

An exception is thrown: 'list' object has no attribute 'split'
The exception location is /opt/netbox/netbox/utilities/forms/fields/csv.py, line 82, in clean

Originally created by @atownson on GitHub (Apr 8, 2025). Originally assigned to: @jnovinger on GitHub. ### Deployment Type NetBox Cloud ### NetBox Version v4.2.6 ### Python Version 3.12 ### Steps to Reproduce 1. Add a custom field named "my_cf_field" to the model Site (or any other model) of **Type** "Multiple object" - set as **not required**, enter `[1,2]` as the Default value, and set **Related object type** to Region (or any other model). 3. Ensure that at least 2 Regions exist (with IDs of 1 and 2) - to populate the default values 4. Attempt to bulk import a Site with the following payload: ``` name,slug,status My Site,my-site,active ``` ### Expected Behavior The site is created and the custom field "my_cf_field" is set to the default of Regions with IDs 1 and 2. ### Observed Behavior An exception is thrown: `'list' object has no attribute 'split'` The exception location is `/opt/netbox/netbox/utilities/forms/fields/csv.py, line 82, in clean`
adam added the type: bugstatus: acceptedseverity: low labels 2025-12-29 21:39:00 +01:00
adam closed this issue 2025-12-29 21:39:01 +01:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#10999