Custom Fields Bug #6073

Closed
opened 2025-12-29 19:36:29 +01:00 by adam · 4 comments
Owner

Originally created by @dreamage on GitHub (Feb 10, 2022).

NetBox version

v3.1.7

Python version

3.7

Steps to Reproduce

  1. Add a Custom Fields
    Name: 1111 Content types: DCIM > device

  2. Add a new device

  3. Delete Custom Fields 1111

  4. Edit the device by step 2 and save
    get a error
    Unknown field name '1111' in custom field data.

Expected Behavior

edit and save

Observed Behavior

Unknown field name '1111' in custom field data.

Originally created by @dreamage on GitHub (Feb 10, 2022). ### NetBox version v3.1.7 ### Python version 3.7 ### Steps to Reproduce 1. Add a Custom Fields Name: 1111 Content types: DCIM > device 2. Add a new device 3. Delete Custom Fields 1111 4. Edit the device by step 2 and save get a error Unknown field name '1111' in custom field data. ### Expected Behavior edit and save ### Observed Behavior Unknown field name '1111' in custom field data.
adam added the type: bugpending closurestatus: under review labels 2025-12-29 19:36:29 +01:00
adam closed this issue 2025-12-29 19:36:29 +01:00
Author
Owner

@jeremystretch commented on GitHub (Apr 4, 2022):

This seems to be reproducible only when the custom field name can be confused with an integer. Repeating the above using a name with at least one alphabetic character works as expected and does not trigger an error. My guess is that the field name is being mistaken for an integer at some point.

It's difficult to image a use case for a numeric-only custom field name. This might be best solved by requiring at least one alphabetic character in a custom field name.

@jeremystretch commented on GitHub (Apr 4, 2022): This seems to be reproducible only when the custom field name can be confused with an integer. Repeating the above using a name with at least one alphabetic character works as expected and does not trigger an error. My guess is that the field name is being mistaken for an integer at some point. It's difficult to image a use case for a numeric-only custom field name. This might be best solved by requiring at least one alphabetic character in a custom field name.
Author
Owner

@dreamage commented on GitHub (Apr 5, 2022):

Thank for your replay.
How can I fix my dirty devices infomation, I can't edit it from WebUI.
Can I edit the postgresql database directly?
table: public.dcim_device -- field: custom_field_data
from {"1111": "test", "abc": "abc"} change to {"abc": "abc"}

@dreamage commented on GitHub (Apr 5, 2022): Thank for your replay. How can I fix my dirty devices infomation, I can't edit it from WebUI. Can I edit the postgresql database directly? table: public.dcim_device -- field: custom_field_data from {"1111": "test", "abc": "abc"} change to {"abc": "abc"}
Author
Owner

@github-actions[bot] commented on GitHub (Jun 4, 2022):

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. NetBox is governed by a small group of core maintainers which means not all opened issues may receive direct feedback. Please see our contributing guide.

@github-actions[bot] commented on GitHub (Jun 4, 2022): This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. NetBox is governed by a small group of core maintainers which means not all opened issues may receive direct feedback. Please see our [contributing guide](https://github.com/netbox-community/netbox/blob/develop/CONTRIBUTING.md).
Author
Owner

@github-actions[bot] commented on GitHub (Jul 4, 2022):

This issue has been automatically closed due to lack of activity. In an effort to reduce noise, please do not comment any further. Note that the core maintainers may elect to reopen this issue at a later date if deemed necessary.

@github-actions[bot] commented on GitHub (Jul 4, 2022): This issue has been automatically closed due to lack of activity. In an effort to reduce noise, please do not comment any further. Note that the core maintainers may elect to reopen this issue at a later date if deemed necessary.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#6073