From 650d676765f5927cd073bb8ff95c0085c71d50e2 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 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, -- 2.45.2