Skip to content

Commit 54cba76

Browse files
Rename state to notebook_state; break instead of return
1 parent c9a9a06 commit 54cba76

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

dataikuapi/dss/notebook.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -39,10 +39,10 @@ def get_state(self, refresh=False):
3939
"/projects/%s/jupyter-notebooks/" % self.project_key,
4040
params={"active": False})
4141
if self.state is None or refresh:
42-
for state in notebook_states:
43-
if state.get("name") == self.notebook_name:
44-
self.state = state
45-
return self.state
42+
for notebook_state in notebook_states:
43+
if notebook_state.get("name") == self.notebook_name:
44+
self.state = notebook_state
45+
break
4646
return self.state
4747

4848
def get_sessions(self):

0 commit comments

Comments
 (0)