]> review.fuel-infra Code Review - openstack-build/neutron-build.git/commitdiff
Fix data passed to policy engine on update
authorSalvatore Orlando <salv.orlando@gmail.com>
Fri, 7 Sep 2012 23:45:48 +0000 (16:45 -0700)
committerSalvatore Orlando <salv.orlando@gmail.com>
Fri, 7 Sep 2012 23:45:48 +0000 (16:45 -0700)
fix bug 1044218

The original resource status fetched to the db was not being
properly updated with the request body before feeding it to the
policy engine

Change-Id: I9f71e40edf44136a40fad1ef272696d6b3ea352d

quantum/api/v2/base.py

index b743cc447dabcf52f60004298c4ed45855adc89f..58f1de8683713dc487ae67b55e7e6e512d912c60 100644 (file)
@@ -376,8 +376,7 @@ class Controller(object):
                           value['required_by_policy'] or
                           not 'default' in value)]
         orig_obj = self._item(request, id, field_list=field_list)
-        orig_obj.update(body)
-
+        orig_obj.update(body[self._resource])
         try:
             policy.enforce(request.context,
                            action,