Custom fields that contains dot in its name causes netbox to fail #5752

Closed
opened 2025-12-29 19:32:13 +01:00 by adam · 2 comments
Owner

Originally created by @damiankaczkowski on GitHub (Dec 9, 2021).

Originally assigned to: @jeremystretch on GitHub.

NetBox version

v3.0.11

Python version

3.9

Steps to Reproduce

  1. Add custom field with a name "dcim.site_postcode" in content types "dcim | site".
  2. Go to sites and add a site and fill "dcim.site_postcode" field with data.
  3. Go to sites overview click on configure table and add "dcim.site_postcode" field to selected columns.
  4. You will now spot that "dcim.site_postcode" column does not show any data. The data is only visible if you enter particular site details.
  5. Also import of site data will fail with error: "Unexpected column header "cf_dcim" found."

Expected Behavior

Entered "dcim.site_postcode" data should be visible on site overview. Site data should import on site import request.

Observed Behavior

Entered "dcim.site_postcode" data is not visible on site overview. Site data won't import on site import request.

Originally created by @damiankaczkowski on GitHub (Dec 9, 2021). Originally assigned to: @jeremystretch on GitHub. ### NetBox version v3.0.11 ### Python version 3.9 ### Steps to Reproduce 1. Add custom field with a name "dcim.site_postcode" in content types "dcim | site". 2. Go to sites and add a site and fill "dcim.site_postcode" field with data. 3. Go to sites overview click on configure table and add "dcim.site_postcode" field to selected columns. 4. You will now spot that "dcim.site_postcode" column does not show any data. The data is only visible if you enter particular site details. 5. Also import of site data will fail with error: "Unexpected column header "cf_dcim" found." ### Expected Behavior Entered "dcim.site_postcode" data should be visible on site overview. Site data should import on site import request. ### Observed Behavior Entered "dcim.site_postcode" data is not visible on site overview. Site data won't import on site import request.
adam added the type: bugstatus: accepted labels 2025-12-29 19:32:13 +01:00
adam closed this issue 2025-12-29 19:32:13 +01:00
Author
Owner

@jeremystretch commented on GitHub (Dec 9, 2021):

To be clear, custom field names should not contain periods. We can implement better validation to prevent this, but the fix for this won't be to allow periods.

@jeremystretch commented on GitHub (Dec 9, 2021): To be clear, custom field names should not contain periods. We can implement better validation to prevent this, but the fix for this won't be to allow periods.
Author
Owner

@damiankaczkowski commented on GitHub (Dec 9, 2021):

Understood and agree. Forbidding user to input erroneous name in such field is valid behavior imo.

@damiankaczkowski commented on GitHub (Dec 9, 2021): Understood and agree. Forbidding user to input erroneous name in such field is valid behavior imo.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#5752