From 1b83d63088d0af707c4cb1361001ea3cf714a38a Mon Sep 17 00:00:00 2001 From: Igor Tkach Date: Fri, 28 Jun 2019 13:08:03 -0400 Subject: Fix move for numeric dictionary keys (issue #97) --- jsonpatch.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'jsonpatch.py') diff --git a/jsonpatch.py b/jsonpatch.py index 4f8a02b..bf6a1b5 100644 --- a/jsonpatch.py +++ b/jsonpatch.py @@ -717,7 +717,7 @@ class DiffBuilder(object): index = self.take_index(item, _ST_REMOVE) if index is not None: op = index[2] - if type(op.key) == int: + if type(op.key) == int and type(key) == int: for v in self.iter_from(index): op.key = v._on_undo_remove(op.path, op.key) -- cgit v1.2.1