diff options
-rw-r--r-- | jsonpatch.py | 4 | ||||
-rwxr-xr-x | tests.py | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/jsonpatch.py b/jsonpatch.py index b1c56d0..cee4820 100644 --- a/jsonpatch.py +++ b/jsonpatch.py @@ -176,10 +176,10 @@ def make_patch(src, dst): # fix when patch with optimization is incorrect patch = JsonPatch.from_diff(src, dst) try: - new = patch.apply(src) + 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) @@ -376,7 +376,7 @@ class MakePatchTestCase(unittest.TestCase): patch = jsonpatch.make_patch(old, new) new_from_patch = jsonpatch.apply_patch(old, patch) self.assertEqual(new, new_from_patch) - + def test_arrays_one_element_sequences(self): """ Tests the case of multiple common one element sequences inside an array """ # see https://github.com/stefankoegl/python-json-patch/issues/30#issuecomment-155070128 |