Merge "Fixing bug where original and new dicts would always be the same"
This commit is contained in:
@@ -12,6 +12,7 @@
|
|||||||
|
|
||||||
import hashlib
|
import hashlib
|
||||||
|
|
||||||
|
import copy
|
||||||
import jsonpatch
|
import jsonpatch
|
||||||
|
|
||||||
from openstack import _log
|
from openstack import _log
|
||||||
@@ -296,7 +297,7 @@ class Image(resource.Resource):
|
|||||||
original = self.to_dict()
|
original = self.to_dict()
|
||||||
|
|
||||||
# Update values from **attrs so they can be passed to jsonpatch
|
# Update values from **attrs so they can be passed to jsonpatch
|
||||||
new = self.to_dict()
|
new = copy.deepcopy(self.to_dict())
|
||||||
new.update(**attrs)
|
new.update(**attrs)
|
||||||
|
|
||||||
patch_string = jsonpatch.make_patch(original, new).to_string()
|
patch_string = jsonpatch.make_patch(original, new).to_string()
|
||||||
|
Reference in New Issue
Block a user