Can't bulk import via CSV with custom fields #5923

Closed
opened 2025-12-29 19:34:18 +01:00 by adam · 0 comments
Owner

Originally created by @brianmiller on GitHub (Jan 11, 2022).

Originally assigned to: @jeremystretch on GitHub.

NetBox version

v3.1.5

Python version

3.9

Steps to Reproduce

Bulk import IP Addresses via WebUI/CSV using "Multiple selection" "Custom Fields".

E.g.,

  1. Create multiple selection custom fields with "IPAM | IP address" as the assigned model.
  2. Bulk import via CSV

Expected Behavior

A successful import

Observed Behavior

My CSV header:
dns_name,address,status,cf_publish_dns_location,cf_publish_dns_ptr_zone,cf_publish_dns_ttl,cf_publish_dns_zones,cf_publish_external_cname_destination,cf_publish_external_cname_zone

Different CSV data attempts:

Attempt 1:
myhost,123.123.123.123/32,active,Internal,mydomain.com,300,mydomain.com,False,mydomain.com
Results in:
Row 1 __all__: Invalid value for custom field 'publish_dns_location': Invalid choice(s) (I, n, t, e, r, n, a, l). Available choices are: Internal, External

Attempt 2:
myhost,123.123.123.123/32,active,"Internal",mydomain.com,300,mydomain.com,False,mydomain.com
Results in:
Row 1 __all__: Invalid value for custom field 'publish_dns_location': Invalid choice(s) (I, n, t, e, r, n, a, l). Available choices are: Internal, External

Attempt 3:
myhost,123.123.123.123/32,active,["Internal"],mydomain.com,300,mydomain.com,False,mydomain.com
Results in:
Row 1 cf_publish_dns_location: Select a valid choice. ["Internal"] is not one of the available choices.
Row 1 __all__: Invalid value for custom field 'publish_dns_location': Required field cannot be empty.

Originally created by @brianmiller on GitHub (Jan 11, 2022). Originally assigned to: @jeremystretch on GitHub. ### NetBox version v3.1.5 ### Python version 3.9 ### Steps to Reproduce Bulk import IP Addresses via WebUI/CSV using "Multiple selection" "Custom Fields". E.g., 1. Create multiple selection custom fields with "IPAM | IP address" as the assigned model. 2. Bulk import via CSV ### Expected Behavior A successful import ### Observed Behavior My CSV header: `dns_name,address,status,cf_publish_dns_location,cf_publish_dns_ptr_zone,cf_publish_dns_ttl,cf_publish_dns_zones,cf_publish_external_cname_destination,cf_publish_external_cname_zone` Different CSV data attempts: Attempt 1: `myhost,123.123.123.123/32,active,Internal,mydomain.com,300,mydomain.com,False,mydomain.com` Results in: `Row 1 __all__: Invalid value for custom field 'publish_dns_location': Invalid choice(s) (I, n, t, e, r, n, a, l). Available choices are: Internal, External` Attempt 2: `myhost,123.123.123.123/32,active,"Internal",mydomain.com,300,mydomain.com,False,mydomain.com` Results in: `Row 1 __all__: Invalid value for custom field 'publish_dns_location': Invalid choice(s) (I, n, t, e, r, n, a, l). Available choices are: Internal, External` Attempt 3: `myhost,123.123.123.123/32,active,["Internal"],mydomain.com,300,mydomain.com,False,mydomain.com` Results in: `Row 1 cf_publish_dns_location: Select a valid choice. ["Internal"] is not one of the available choices.` `Row 1 __all__: Invalid value for custom field 'publish_dns_location': Required field cannot be empty.`
adam added the type: bugstatus: accepted labels 2025-12-29 19:34:18 +01:00
adam closed this issue 2025-12-29 19:34:18 +01:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#5923