mirror of
https://github.com/netbox-community/netbox.git
synced 2024-05-10 07:54:54 +00:00
fixes #2837 - select2 nullable filter fields add multiple null_option elements when paging
This commit is contained in:
@ -11,6 +11,7 @@ v2.5.5 (FUTURE)
|
||||
* [#2824](https://github.com/digitalocean/netbox/issues/2824) - Fix template exception when viewing rack elevations list
|
||||
* [#2833](https://github.com/digitalocean/netbox/issues/2833) - Fix form widget for front port template creation
|
||||
* [#2835](https://github.com/digitalocean/netbox/issues/2835) - Fix certain model filters did not support the `q` query param
|
||||
* [#2837](https://github.com/digitalocean/netbox/issues/2837) - Fix select2 nullable filter fields add multiple null_option elements when paging
|
||||
|
||||
---
|
||||
|
||||
|
@ -197,8 +197,8 @@ $(document).ready(function() {
|
||||
return obj;
|
||||
});
|
||||
|
||||
// Handle the null option
|
||||
if (element.getAttribute('data-null-option')) {
|
||||
// Handle the null option, but only add it once
|
||||
if (element.getAttribute('data-null-option') && data.previous === null) {
|
||||
var null_option = $(element).children()[0]
|
||||
results.unshift({
|
||||
id: null_option.value,
|
||||
|
Reference in New Issue
Block a user