Skip to content

Commit

Permalink
Fixes #3044: Ignore site/rack fields when connecting a new cable via …
Browse files Browse the repository at this point in the history
…device search
  • Loading branch information
jeremystretch committed Apr 4, 2019
1 parent 74c03e3 commit 090efde
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ v2.5.10 (FUTURE)
* [#3036](https://github.com/digitalocean/netbox/issues/3036) - DCIM interfaces API endpoint should not include VM interfaces
* [#3039](https://github.com/digitalocean/netbox/issues/3039) - Fix exception when retrieving change object for a component template via API
* [#3041](https://github.com/digitalocean/netbox/issues/3041) - Fix form widget for bulk cable label update
* [#3044](https://github.com/digitalocean/netbox/issues/3044) - Ignore site/rack fields when connecting a new cable via device search

---

Expand Down
5 changes: 3 additions & 2 deletions netbox/project-static/js/forms.js
Original file line number Diff line number Diff line change
Expand Up @@ -156,11 +156,12 @@ $(document).ready(function() {
filter_for_elements.each(function(index, filter_for_element) {
var param_name = $(filter_for_element).attr(attr_name);
var is_nullable = $(filter_for_element).attr("nullable");
var is_visible = $(filter_for_element).is(":visible");
var value = $(filter_for_element).val();

if (param_name && value) {
if (param_name && is_visible && value) {
parameters[param_name] = value;
} else if (param_name && is_nullable) {
} else if (param_name && is_visible && is_nullable) {
parameters[param_name] = "null";
}
});
Expand Down

0 comments on commit 090efde

Please sign in to comment.