None filters get lost when returning to a list after making an edit #7717

Closed
opened 2025-12-29 20:27:26 +01:00 by adam · 1 comment
Owner

Originally created by @neuro42 on GitHub (Mar 3, 2023).

Originally assigned to: @jeremystretch on GitHub.

NetBox version

v3.4.5

Python version

3.9

Steps to Reproduce

  1. Have some VMs without a platform set
  2. Filter the Virtual Machines list for "Status: Active, and Platform: None"
  3. Use the edit button at the side of the list item to add a platform to one of the VMs without a platform
  4. Save the changes

Expected Behavior

The search list you are returned to to have Status: Active and Plaform: None filters

Observed Behavior

The search list you are returned to has only the Status: Active filter

This seems to be a general problem with "None" filters being forgotten when coming back to lists -- I've also seen it with other fields and objects.

Originally created by @neuro42 on GitHub (Mar 3, 2023). Originally assigned to: @jeremystretch on GitHub. ### NetBox version v3.4.5 ### Python version 3.9 ### Steps to Reproduce 1. Have some VMs without a platform set 2. Filter the Virtual Machines list for "Status: Active, and Platform: None" 3. Use the edit button at the side of the list item to add a platform to one of the VMs without a platform 4. Save the changes ### Expected Behavior The search list you are returned to to have Status: Active and Plaform: None filters ### Observed Behavior The search list you are returned to has only the Status: Active filter This seems to be a general problem with "None" filters being forgotten when coming back to lists -- I've also seen it with other fields and objects.
adam added the type: bugstatus: accepted labels 2025-12-29 20:27:26 +01:00
adam closed this issue 2025-12-29 20:27:27 +01:00
Author
Owner

@jeremystretch commented on GitHub (Mar 7, 2023):

Turns out this has nothing to do with null values specifically. The ampersand used to combine the two parameters is not getting escaped properly, so only the first parameter is being preserved when passing the return URL. This is because Django's escape_uri_path() function treats & as a safe character. We should probably just cal urllb.quote.parse() on the return URL value directly.

@jeremystretch commented on GitHub (Mar 7, 2023): Turns out this has nothing to do with `null` values specifically. The ampersand used to combine the two parameters is not getting escaped properly, so only the first parameter is being preserved when passing the return URL. This is because Django's `escape_uri_path()` function treats `&` as a safe character. We should probably just cal `urllb.quote.parse()` on the return URL value directly.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#7717