diff options
| author | Johan Forsberg <johan.forsberg@gmail.com> | 2014-01-11 21:40:29 +0100 |
|---|---|---|
| committer | Johan Forsberg <johan.forsberg@gmail.com> | 2014-01-11 21:40:29 +0100 |
| commit | 7e459af293954675a5ac9852008666bfd95187ea (patch) | |
| tree | 19f9d21932864b54df0f8cf404150de3c339efb1 /jsonpatch.py | |
| parent | 48f9adb8991deb62ba4f327d5e96766c4d0d55e7 (diff) | |
| download | python-json-patch-7e459af293954675a5ac9852008666bfd95187ea.tar.gz | |
allow moving array items into other items in same array
Diffstat (limited to 'jsonpatch.py')
| -rw-r--r-- | jsonpatch.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/jsonpatch.py b/jsonpatch.py index c614666..a46c9b0 100644 --- a/jsonpatch.py +++ b/jsonpatch.py @@ -466,7 +466,7 @@ class MoveOperation(PatchOperation): subobj, part = from_ptr.to_last(obj) value = subobj[part] - if self.pointer.contains(from_ptr): + if isinstance(subobj, dict) and self.pointer.contains(from_ptr): raise JsonPatchException('Cannot move values into its own children') obj = RemoveOperation({ |
