From: Salvatore Orlando Date: Fri, 7 Sep 2012 23:45:48 +0000 (-0700) Subject: Fix data passed to policy engine on update X-Git-Url: https://review.fuel-infra.org/gitweb?a=commitdiff_plain;h=650d676765f5927cd073bb8ff95c0085c71d50e2;p=openstack-build%2Fneutron-build.git Fix data passed to policy engine on update 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 --- diff --git a/quantum/api/v2/base.py b/quantum/api/v2/base.py index b743cc447..58f1de868 100644 --- a/quantum/api/v2/base.py +++ b/quantum/api/v2/base.py @@ -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,