Renaming custom field does values in UI (yet shows correctly via API) #5110

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

Originally created by @ossicoinc on GitHub (Jul 28, 2021).

NetBox version

v2.11.10

Python version

3.9

Steps to Reproduce

  1. Add custom field to type (I chose VRF item type)
  2. Add new item (VRF) with data in the custom field, Save
  3. Go back to custom fields and rename the field
  4. Go to site and view the VRF

Expected Behavior

I would expect the data from the renamed field to be shown.

Observed Behavior

The data is shown as "--"
However, when querying via the API the custom field is renamed and the data is intact.

I have also observed when querying the API that the custom_field is renamed, but if I apply a "tenant=xxxx" filter to the api request, the field is empty:

http://10.132.6.96:8080/api/ipam/vrfs/?name=MY%20VRF

My workaround is to:

  1. Add a new object of same time, with a custom field filled in.
  2. Run a search with an exact match on a custom field for a record you know.
  3. Open the original record, and custom field magically is back to being populated in the UI.

I believe this is probably a caching/db index issue.

Originally created by @ossicoinc on GitHub (Jul 28, 2021). ### NetBox version v2.11.10 ### Python version 3.9 ### Steps to Reproduce 1. Add custom field to type (I chose VRF item type) 2. Add new item (VRF) with data in the custom field, Save 3. Go back to custom fields and rename the field 4. Go to site and view the VRF ### Expected Behavior I would expect the data from the renamed field to be shown. ### Observed Behavior The data is shown as "--" However, when querying via the API the custom field is renamed and the data is intact. I have also observed when querying the API that the custom_field is renamed, but if I apply a "tenant=xxxx" filter to the api request, the field is empty: http://10.132.6.96:8080/api/ipam/vrfs/?name=MY%20VRF My workaround is to: 1. Add a new object of same time, with a custom field filled in. 2. Run a search with an exact match on a custom field for a record you know. 2. Open the original record, and custom field magically is back to being populated in the UI. I believe this is probably a caching/db index issue.
adam closed this issue 2025-12-29 19:24:23 +01:00
Author
Owner

@bellwood commented on GitHub (Aug 3, 2021):

I believe this is probably a caching/db index issue.

If you disable caching in configuration.py, CACHE_TIMEOUT = 0 does this issue still occur?

@bellwood commented on GitHub (Aug 3, 2021): > I believe this is probably a caching/db index issue. If you disable caching in configuration.py, `CACHE_TIMEOUT = 0` does this issue still occur?
Author
Owner

@jeremystretch commented on GitHub (Aug 16, 2021):

I'm not able to reproduce this on v2.11.11 when caching is disabled. Definitely seems like a caching bug.

@jeremystretch commented on GitHub (Aug 16, 2021): I'm not able to reproduce this on v2.11.11 when caching is disabled. Definitely seems like a caching bug.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#5110