Skip to content

Commit

Permalink
Send notebook cell source as string when type is list (#354)
Browse files Browse the repository at this point in the history
  • Loading branch information
davidbrochart authored Sep 29, 2023
1 parent 08db922 commit 8dd5b13
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions plugins/contents/fps_contents/routes.py
Original file line number Diff line number Diff line change
Expand Up @@ -186,6 +186,10 @@ async def read_content(
if "metadata" not in cell:
cell["metadata"] = {}
cell["metadata"].update({"trusted": False})
if cell["cell_type"] == "code":
cell_source = cell["source"]
if not isinstance(cell_source, str):
cell["source"] = "".join(cell_source)
if file_format != "json":
content = json.dumps(nb)
elif path.suffix == ".json":
Expand Down

0 comments on commit 8dd5b13

Please sign in to comment.