jupyter-server / jupyter_ydoc

Jupyter document structures for collaborative editing using Yjs/pycrdt
https://jupyter-ydoc.readthedocs.io
BSD 3-Clause "New" or "Revised" License
29 stars 17 forks source link

Fix metadata issue #158

Closed hbcarlos closed 1 year ago

hbcarlos commented 1 year ago

When the YNotebook is empty, if we try to get the content, it will raise an exception because the 'metadata' key doesn't exist.

This PR fixes the issue.

hbcarlos commented 1 year ago

@meeseeksdev please backport to 0.2.x

lumberbot-app[bot] commented 1 year ago

Owee, I'm MrMeeseeks, Look at me.

There seem to be a conflict, please backport manually. Here are approximate instructions:

  1. Checkout backport branch and update it.
git checkout 0.2.x
git pull
  1. Cherry pick the first parent branch of the this PR on top of the older branch:

    git cherry-pick -x -m1 6672e3dd27c2980f45ce1037101f0198fac3d9ff
  2. You will likely have some merge/cherry-pick conflict here, fix them and commit:

git commit -am 'Backport PR #158: Fix metadata issue'
  1. Push to a named branch:
git push YOURFORK 0.2.x:auto-backport-of-pr-158-on-0.2.x
  1. Create a PR against branch 0.2.x, I would have named this PR:

"Backport PR #158 on branch 0.2.x (Fix metadata issue)"

And apply the correct labels and milestones.

Congratulations — you did some good work! Hopefully your backport PR will be tested by the continuous integration and merged soon!

Remember to remove the Still Needs Manual Backport label once the PR gets merged.

If these instructions are inaccurate, feel free to suggest an improvement.