mirror of
https://github.com/livebook-dev/livebook.git
synced 2024-12-27 09:53:08 +08:00
Make sure session is forked with complete data
This commit is contained in:
parent
e02bcce0bf
commit
6274731c8d
1 changed files with 3 additions and 1 deletions
|
@ -547,7 +547,9 @@ defmodule LivebookWeb.SessionLive do
|
|||
end
|
||||
|
||||
def handle_event("fork_session", %{}, socket) do
|
||||
notebook = Notebook.forked(socket.private.data.notebook)
|
||||
# Fetch the data, as we don't keep cells' source in the state
|
||||
data = Session.get_data(socket.assigns.session_id)
|
||||
notebook = Notebook.forked(data.notebook)
|
||||
%{images_dir: images_dir} = Session.get_summary(socket.assigns.session_id)
|
||||
create_session(socket, notebook: notebook, copy_images_from: images_dir)
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue