Skip to content

Commit 146097d

Browse files
committed
Adds id to cells
1 parent d362e52 commit 146097d

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

jupyter_ydoc/ydoc.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -125,6 +125,8 @@ def source(self, value):
125125
ycells = []
126126
for cell in nb["cells"]:
127127
cell["source"] = Y.YText(cell["source"])
128+
if "id" not in cell:
129+
cell["id"] = str(uuid4())
128130
if "outputs" in cell:
129131
cell["outputs"] = Y.YArray(cell["outputs"])
130132
ycell = Y.YMap(cell)

0 commit comments

Comments
 (0)