fix bug in subnets API for newton
authorBin Yang <bin.yang@windriver.com>
Thu, 2 Mar 2017 05:47:34 +0000 (13:47 +0800)
committerBin Yang <bin.yang@windriver.com>
Thu, 2 Mar 2017 05:47:34 +0000 (13:47 +0800)
Change-Id: Iad7ce19ca320632e6499440df0799333921f4d9b
Issue-Id: MULTIVIM-19
Signed-off-by: Bin Yang <bin.yang@windriver.com>
newton/newton/requests/views/subnet.py

index b057608..95e380f 100644 (file)
@@ -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)