[PR #14607] [MERGED] Fixes #13606: Fix filtering by null for multiselect custom fields #14423

Closed
opened 2025-12-29 23:24:24 +01:00 by adam · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/netbox-community/netbox/pull/14607
Author: @jeremystretch
Created: 12/26/2023
Status: Merged
Merged: 12/27/2023
Merged by: @jeremystretch

Base: developHead: 13606-filter-null-multiselect-cf


📝 Commits (1)

  • d91c525 Fixes #13606: Fix filtering by null for multiselect custom fields

📊 Changes

3 files changed (+24 additions, -9 deletions)

View changed files

📝 netbox/extras/models/customfields.py (+1 -3)
📝 netbox/extras/tests/test_customfields.py (+7 -6)
📝 netbox/utilities/filters.py (+16 -0)

📄 Description

Fixes: #13606

  • Introduce MultiValueArrayFilter to properly handle filtering by null for multi-select custom fields (or any other string array field)
  • Update CustomFieldModelFilterTest to include filtering for null values

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/netbox-community/netbox/pull/14607 **Author:** [@jeremystretch](https://github.com/jeremystretch) **Created:** 12/26/2023 **Status:** ✅ Merged **Merged:** 12/27/2023 **Merged by:** [@jeremystretch](https://github.com/jeremystretch) **Base:** `develop` ← **Head:** `13606-filter-null-multiselect-cf` --- ### 📝 Commits (1) - [`d91c525`](https://github.com/netbox-community/netbox/commit/d91c525f8fa4a376de171aabd5ac51bdf19a73ba) Fixes #13606: Fix filtering by null for multiselect custom fields ### 📊 Changes **3 files changed** (+24 additions, -9 deletions) <details> <summary>View changed files</summary> 📝 `netbox/extras/models/customfields.py` (+1 -3) 📝 `netbox/extras/tests/test_customfields.py` (+7 -6) 📝 `netbox/utilities/filters.py` (+16 -0) </details> ### 📄 Description ### Fixes: #13606 - Introduce `MultiValueArrayFilter` to properly handle filtering by `null` for multi-select custom fields (or any other string array field) - Update `CustomFieldModelFilterTest` to include filtering for null values --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
adam added the pull-request label 2025-12-29 23:24:24 +01:00
adam closed this issue 2025-12-29 23:24:24 +01:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#14423