Skip to content

Commit 82ac779

Browse files
committed
Remove re-creation of no-optimization patch
1 parent 1964607 commit 82ac779

File tree

1 file changed

+1
-12
lines changed

1 file changed

+1
-12
lines changed

jsonpatch.py

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -188,18 +188,7 @@ def make_patch(src, dst):
188188
True
189189
"""
190190

191-
# TODO: fix patch optimiztion and remove the following check
192-
# fix when patch with optimization is incorrect
193-
patch = JsonPatch.from_diff(src, dst)
194-
try:
195-
new = patch.apply(src)
196-
except JsonPatchConflict: # see TODO
197-
return JsonPatch.from_diff(src, dst, False)
198-
199-
if new != dst:
200-
return JsonPatch.from_diff(src, dst, False)
201-
202-
return patch
191+
return JsonPatch.from_diff(src, dst)
203192

204193

205194
class JsonPatch(object):

0 commit comments

Comments
 (0)