Skip to content

Commit 60e582d

Browse files
authored
Fix missing nbformat version
1 parent 2b8e788 commit 60e582d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

jupyter_ydoc/ynotebook.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -202,7 +202,7 @@ def get(self) -> Dict:
202202
cells = []
203203
for i in range(len(self._ycells)):
204204
cell = self.get_cell(i)
205-
if "id" in cell and meta["nbformat"] == 4 and meta["nbformat_minor"] <= 4:
205+
if "id" in cell and meta.get("nbformat", 0) == 4 and meta.get("nbformat_minor", 0) <= 4:
206206
# strip cell IDs if we have notebook format 4.0-4.4
207207
del cell["id"]
208208
if (

0 commit comments

Comments
 (0)