diff options
Diffstat (limited to 'modules-available')
-rw-r--r-- | modules-available/roomplanner/clientscript.js | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/modules-available/roomplanner/clientscript.js b/modules-available/roomplanner/clientscript.js index 722e3909..5c9776b2 100644 --- a/modules-available/roomplanner/clientscript.js +++ b/modules-available/roomplanner/clientscript.js @@ -174,9 +174,14 @@ function onBtnSelect() { } function onPcDelete(muuid) { - var bySubnet = machineCache[muuid]; - var bySearch = machineCache[muuid]; - var value = !bySubnet ? bySearch : bySubnet; + var value = machineCache[muuid]; + if (!value) { + subnetMachines.forEach(function (v, i, a) { + if (subnetMachines[i] && subnetMachines[i].machineuuid === muuid) { + value = subnetMachines[i]; + } + }); + } value.fixedlocationid = null; makeCombinedFieldSingle(value); } |