Skip to content

Commit d4f2f70

Browse files
initialize state instead of content in list
1 parent c5fbe90 commit d4f2f70

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

dataikuapi/dss/notebook.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@ def get_state(self):
4141
for notebook in notebook_list:
4242
if notebook.get("name") == self.notebook_name:
4343
self.state = notebook
44+
return self.state
4445
return self.state
4546

4647
def get_sessions(self):

dataikuapi/dss/project.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -844,7 +844,7 @@ def list_jupyter_notebooks(self, as_objects=True, active=False):
844844
notebooks = self.client._perform_json("GET", "/projects/%s/jupyter-notebooks/" % self.project_key,
845845
params={"active": active})
846846
if as_objects:
847-
return [DSSNotebook(self.client, notebook['projectKey'], notebook['name'], content=notebook) for notebook in notebooks]
847+
return [DSSNotebook(self.client, notebook_state['projectKey'], notebook_state['name'], state=notebook_state) for notebook_state in notebooks]
848848
else:
849849
return notebooks
850850

0 commit comments

Comments
 (0)