Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Clearing the ordering of a table does not clear the ordering key from the UserConfig data #12914

Closed
jeremystretch opened this issue Jun 15, 2023 · 0 comments · Fixed by #12915
Assignees
Labels
status: accepted This issue has been accepted for implementation type: bug A confirmed report of unexpected behavior in the application

Comments

@jeremystretch
Copy link
Member

NetBox version

v3.5.3

Python version

3.8

Steps to Reproduce

  1. Open the sites list and order the entries by name.
  2. In a shell, retrieve the UserConfig instance for your user and inspect the entry for tables.SiteTable.ordering:
>>> uc=UserConfig.objects.get(user__username='admin')
>>> uc.data['tables']['SiteTable']['ordering']
['name']
  1. In the UI, clear the applied ordering by clicking the X in the column header.
  2. Refresh and re-inspect the UserConfig data:
>>> uc.refresh_from_db()
>>> uc.data['tables']['SiteTable']['ordering']
['']

Expected Behavior

The ordering key should be removed from the data, as there is no longer any preference stored.

Observed Behavior

ordering is set to a list containing an empty string. This does not effect any breaking behavior AFAICT, however it should be cleaned up as it can pose complications.

@jeremystretch jeremystretch added type: bug A confirmed report of unexpected behavior in the application status: accepted This issue has been accepted for implementation labels Jun 15, 2023
@jeremystretch jeremystretch self-assigned this Jun 15, 2023
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Sep 14, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
status: accepted This issue has been accepted for implementation type: bug A confirmed report of unexpected behavior in the application
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant