summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefan Kögl <stefan@skoegl.net>2017-09-10 13:29:06 +0200
committerStefan Kögl <stefan@skoegl.net>2017-09-10 19:24:48 +0200
commit82ac77987808633c625c738ade5f7abc6e6a0764 (patch)
treea133183e830c9f204c02fd62201b23f2a6ad1f13
parent196460716ac1fc3d84dee403cfa68386261998f5 (diff)
downloadpython-json-patch-82ac77987808633c625c738ade5f7abc6e6a0764.tar.gz
Remove re-creation of no-optimization patch
-rw-r--r--jsonpatch.py13
1 files changed, 1 insertions, 12 deletions
diff --git a/jsonpatch.py b/jsonpatch.py
index d1d091f..8db0b7f 100644
--- a/jsonpatch.py
+++ b/jsonpatch.py
@@ -188,18 +188,7 @@ def make_patch(src, dst):
True
"""
- # TODO: fix patch optimiztion and remove the following check
- # fix when patch with optimization is incorrect
- patch = JsonPatch.from_diff(src, dst)
- try:
- new = patch.apply(src)
- except JsonPatchConflict: # see TODO
- return JsonPatch.from_diff(src, dst, False)
-
- if new != dst:
- return JsonPatch.from_diff(src, dst, False)
-
- return patch
+ return JsonPatch.from_diff(src, dst)
class JsonPatch(object):