summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBin Yang <bin.yang@windriver.com>2017-03-02 13:47:34 +0800
committerBin Yang <bin.yang@windriver.com>2017-03-02 13:47:34 +0800
commitc36d6d4a26e9ef811ea7bdd3ce1464d39a85b2bc (patch)
tree3615245e247c05c96a52d5e12307a6d7f915dc3c
parentaae30b6cb914999c87bc29b1eda20f26f9982216 (diff)
fix bug in subnets API for newton
Change-Id: Iad7ce19ca320632e6499440df0799333921f4d9b Issue-Id: MULTIVIM-19 Signed-off-by: Bin Yang <bin.yang@windriver.com>
-rw-r--r--newton/newton/requests/views/subnet.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/newton/newton/requests/views/subnet.py b/newton/newton/requests/views/subnet.py
index b057608d..95e380fc 100644
--- a/newton/newton/requests/views/subnet.py
+++ b/newton/newton/requests/views/subnet.py
@@ -71,7 +71,7 @@ class Subnets(APIView):
else:
# convert the key naming in the subnet specified by id
old_subnet = content["subnet"]
- del content["subnet"]
+ content.pop("subnet", None)
VimDriverUtils.replace_key_by_mapping(old_subnet,
self.keys_mapping)
content.update(old_subnet)