Fix metadata removal

This fixes the case where known metadata types were not being removed
upon saving.  When trying to apply name changes to the provided value,
the work was done out of order, causing the item to be taken out
of the 'removed' list.

Change-Id: I0058ce369a9616b4c49f3d6d1a54cf69144e2f0c
Co-Authored-By: Matt Wood <matt.wood@hpe.com>
Closes-Bug: 1618578
(cherry picked from commit 2425e6e860)
This commit is contained in:
Matt Borland 2016-09-22 13:40:29 -06:00 committed by Rob Cresswell
parent 74c9c152fe
commit 02ceefd81b
1 changed files with 1 additions and 1 deletions

View File

@ -61,8 +61,8 @@
angular.forEach(removed, function bug1606988(value, removedKey) {
angular.forEach(ctrl.tree.flatTree, function compareToDefinitions(item) {
if (item.leaf && removedKey.toLocaleLowerCase() === item.leaf.name.toLocaleLowerCase()) {
removed[item.leaf.name] = value;
delete removed[removedKey];
removed[item.leaf.name] = value;
}
});
});