applied_filters template tag does not handle null_option on form fields #5337

Closed
opened 2025-12-29 19:26:51 +01:00 by adam · 0 comments
Owner

Originally created by @thatmattlove on GitHub (Sep 8, 2021).

Originally assigned to: @thatmattlove on GitHub.

NetBox version

v3.0.2-dev

Python version

3.9

Steps to Reproduce

Prior to 2a293d5, you won't be able to reproduce this because null_option is not properly handled in the UI. After updating...

  1. Navigate to IPAM → IP Addresses → Filter
  2. Select 'Global' VRF in 'Available VRFs' field
  3. Click Search

Expected Behavior

When null_option is present on a selected form field and is not None, the applied filters should display the null_option value.

Observed Behavior

KeyError is raised because vrf_id is not in the cleaned form data.

Originally created by @thatmattlove on GitHub (Sep 8, 2021). Originally assigned to: @thatmattlove on GitHub. ### NetBox version v3.0.2-dev ### Python version 3.9 ### Steps to Reproduce Prior to 2a293d5, you won't be able to reproduce this because `null_option` is not properly handled in the UI. After updating... 1. Navigate to IPAM → IP Addresses → Filter 2. Select 'Global' VRF in 'Available VRFs' field 3. Click Search ### Expected Behavior When `null_option` is present on a selected form field and is not `None`, the applied filters should display the `null_option` value. ### Observed Behavior `KeyError` is raised because `vrf_id` is not in the cleaned form data.
adam added the type: bugstatus: accepted labels 2025-12-29 19:26:51 +01:00
adam closed this issue 2025-12-29 19:26:51 +01:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#5337