Skip to content

Commit 2eabf94

Browse files
avoid crashing if cell id doesnt exist when diffing notebooks (#1148)
* avoid crashing if cell id doesnt exist when diffing notebooks * Lint the code Co-authored-by: Frédéric Collonval <[email protected]>
1 parent 88de35e commit 2eabf94

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

jupyterlab_git/git.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -380,7 +380,7 @@ def read_notebook(content):
380380
# TODO Fix this in nbdime
381381
def remove_cell_ids(nb):
382382
for cell in nb.cells:
383-
del cell["id"]
383+
cell.pop("id", None)
384384
return nb
385385

386386
current_loop = tornado.ioloop.IOLoop.current()

0 commit comments

Comments
 (0)