Skip to content

Commit 6672e3d

Browse files
authored
Fix metadata issue (#158)
* Fix metadata issue * Clean up
1 parent 1ec81ff commit 6672e3d

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

jupyter_ydoc/ynotebook.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -220,9 +220,9 @@ def get(self) -> Dict:
220220

221221
return dict(
222222
cells=cells,
223-
metadata=meta["metadata"],
224-
nbformat=int(meta["nbformat"]),
225-
nbformat_minor=int(meta["nbformat_minor"]),
223+
metadata=meta.get("metadata", {}),
224+
nbformat=int(meta.get("nbformat", 0)),
225+
nbformat_minor=int(meta.get("nbformat_minor", 0)),
226226
)
227227

228228
def set(self, value: Dict) -> None:

0 commit comments

Comments
 (0)