-
Notifications
You must be signed in to change notification settings - Fork 2.9k
Closed
Labels
status: acceptedThis issue has been accepted for implementationThis issue has been accepted for implementationtype: bugA confirmed report of unexpected behavior in the applicationA confirmed report of unexpected behavior in the application
Description
NetBox version
v3.5.3
Python version
3.8
Steps to Reproduce
- Open the sites list and order the entries by name.
- 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']
- In the UI, clear the applied ordering by clicking the X in the column header.
- 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.
Metadata
Metadata
Assignees
Labels
status: acceptedThis issue has been accepted for implementationThis issue has been accepted for implementationtype: bugA confirmed report of unexpected behavior in the applicationA confirmed report of unexpected behavior in the application