We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
move
1 parent a33021b commit 4443d32Copy full SHA for 4443d32
jsonpatch.py
@@ -484,6 +484,10 @@ def apply(self, obj):
484
except (KeyError, IndexError) as ex:
485
raise JsonPatchConflict(str(ex))
486
487
+ # If source and target are equal, this is a no-op
488
+ if self.pointer == from_ptr:
489
+ return obj
490
+
491
if isinstance(subobj, MutableMapping) and \
492
self.pointer.contains(from_ptr):
493
raise JsonPatchConflict('Cannot move values into its own children')
0 commit comments