Merge "v2 image update fix"

This commit is contained in:
Zuul 2018-01-25 01:53:22 +00:00 committed by Gerrit Code Review
commit 3137edcf89

View File

@ -294,7 +294,12 @@ class Image(resource.Resource):
'Accept': ''
}
original = self.to_dict()
patch_string = jsonpatch.make_patch(original, attrs).to_string()
# Update values from **attrs so they can be passed to jsonpatch
new = self.to_dict()
new.update(**attrs)
patch_string = jsonpatch.make_patch(original, new).to_string()
resp = session.patch(url,
data=patch_string,
headers=headers)