From ba6cec5529a2409fe30a54c95e38b150be616ffa Mon Sep 17 00:00:00 2001 From: Salvatore Orlando Date: Fri, 7 Sep 2012 16:45:48 -0700 Subject: [PATCH] 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 --- quantum/api/v2/base.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/quantum/api/v2/base.py b/quantum/api/v2/base.py index b743cc447d..58f1de8683 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,