Avoid JsonPatch twice

apply_patch will convert patch parameter into JsonPatch, so we don't
need to do it. If we do, the parameter is JsonPatched twice.

Change-Id: I9f01089ee5f9a25c27d531ee60dc60a9c472c7fe
Closes-Bug: #1512206
This commit is contained in:
Hua Wang 2015-11-02 11:30:31 +08:00
parent 082c8ed0b8
commit b1e16a6cc5
1 changed files with 1 additions and 1 deletions

View File

@ -53,7 +53,7 @@ def apply_jsonpatch(doc, patch):
msg = _('Adding a new attribute (%s) to the root of '
' the resource is not allowed')
raise wsme.exc.ClientSideError(msg % p['path'])
return jsonpatch.apply_patch(doc, jsonpatch.JsonPatch(patch))
return jsonpatch.apply_patch(doc, patch)
def get_rpc_resource(resource, resource_ident):