User's table configuration includes errant key available_columns #6055

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

Originally created by @jeremystretch on GitHub (Feb 4, 2022).

Originally assigned to: @thatmattlove on GitHub.

NetBox version

v3.1.7

Python version

3.8

Steps to Reproduce

  1. Open the sites list as an authenticated user
  2. Add or remove a table column (to effect a custom configuration)
  3. Inspect the UserConfig instance for the user in the NetBox shell:
>>> config = UserConfig.objects.get(user_id=$USERID)
>>> config.data['tables']['SiteTable']
{'columns': ['name', 'status', 'facility', 'region', 'tenant', 'tags'], 'available_columns': []}

Expected Behavior

The table preferences should include only the columns key.

Observed Behavior

The available_columns key is also present, and contains an empty list.

Although this has no known impact on NetBox's operation, this key should not appear in UserConfig data.

Originally created by @jeremystretch on GitHub (Feb 4, 2022). Originally assigned to: @thatmattlove on GitHub. ### NetBox version v3.1.7 ### Python version 3.8 ### Steps to Reproduce 1. Open the sites list as an authenticated user 2. Add or remove a table column (to effect a custom configuration) 3. Inspect the UserConfig instance for the user in the NetBox shell: ```python >>> config = UserConfig.objects.get(user_id=$USERID) >>> config.data['tables']['SiteTable'] {'columns': ['name', 'status', 'facility', 'region', 'tenant', 'tags'], 'available_columns': []} ``` ### Expected Behavior The table preferences should include only the `columns` key. ### Observed Behavior The `available_columns` key is also present, and contains an empty list. Although this has no known impact on NetBox's operation, this key should not appear in UserConfig data.
adam added the type: bugstatus: accepted labels 2025-12-29 19:36:10 +01:00
adam closed this issue 2025-12-29 19:36:10 +01:00
Author
Owner

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

@thatmattlove do you have any time available to look into this? It seems to stem from how the handleSubmit function in tableConfig.ts is processing the form data.

@jeremystretch commented on GitHub (Feb 4, 2022): @thatmattlove do you have any time available to look into this? It seems to stem from how the [`handleSubmit` function](https://github.com/netbox-community/netbox/blob/795134c084c24efe2c86de266390071216b0233b/netbox/project-static/src/tableConfig.ts#L85) in `tableConfig.ts` is processing the form data.
Author
Owner

@jeremystretch commented on GitHub (Feb 7, 2022):

There's a similar issue where, when a user clicks the "reset" button to remove the customization, columns gets set to an empty list in the UserConfig data. This doesn't currently cause a problem, however it will cause NetBox to ignore administratively-defined default preferences in release v3.2 (see #7759).

@jeremystretch commented on GitHub (Feb 7, 2022): There's a similar issue where, when a user clicks the "reset" button to remove the customization, `columns` gets set to an empty list in the UserConfig data. This doesn't currently cause a problem, however it will cause NetBox to ignore administratively-defined default preferences in release v3.2 (see #7759).
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#6055