From 02ceefd81be29ca60acd05ba1677eb1c8eaae4e0 Mon Sep 17 00:00:00 2001 From: Matt Borland Date: Thu, 22 Sep 2016 13:40:29 -0600 Subject: [PATCH] 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 Closes-Bug: 1618578 (cherry picked from commit 2425e6e860932514c963844dfab6d24b023883bf) --- .../static/app/core/metadata/modal/modal.controller.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/openstack_dashboard/static/app/core/metadata/modal/modal.controller.js b/openstack_dashboard/static/app/core/metadata/modal/modal.controller.js index 13da2d901b..83fa1c2e27 100644 --- a/openstack_dashboard/static/app/core/metadata/modal/modal.controller.js +++ b/openstack_dashboard/static/app/core/metadata/modal/modal.controller.js @@ -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; } }); });