Skip to content

Commit 3b3c432

Browse files
committed
Rename parent and children
1 parent dcd4e5f commit 3b3c432

1 file changed

Lines changed: 5 additions & 5 deletions

File tree

dataikuapi/dss/projectfolder.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ def get_path(self):
2828
:returns str: the path of this project folder
2929
"""
3030
definition = self.client._perform_json("GET", "/project-folders/%s" % self.project_folder_id)
31-
parent_id = definition.get("parent", None)
31+
parent_id = definition.get("parentId", None)
3232
if parent_id is not None:
3333
parent = DSSProjectFolder(self.client, parent_id)
3434
path = parent.get_path()
@@ -42,19 +42,19 @@ def get_parent(self):
4242
4343
:returns: A :class:`dataikuapi.dss.projectfolders.DSSProjectFolder` to interact with its parent or None for the root project folder
4444
"""
45-
parent = self.client._perform_json("GET", "/project-folders/%s" % self.project_folder_id).get("parent", None)
46-
if parent is None:
45+
parent_id = self.client._perform_json("GET", "/project-folders/%s" % self.project_folder_id).get("parentId", None)
46+
if parent_id is None:
4747
return None
4848
else:
49-
return DSSProjectFolder(self.client, parent)
49+
return DSSProjectFolder(self.client, parent_id)
5050

5151
def list_child_folders(self):
5252
"""
5353
List the child project folders inside this project folder
5454
5555
:returns list: A list of :class:`dataikuapi.dss.projectfolders.DSSProjectFolder` to interact with its sub-folders
5656
"""
57-
children = self.client._perform_json("GET", "/project-folders/%s" % self.project_folder_id).get("children", [])
57+
children = self.client._perform_json("GET", "/project-folders/%s" % self.project_folder_id).get("childrenIds", [])
5858
return [DSSProjectFolder(self.client, child) for child in children]
5959

6060
def list_project_keys(self):

0 commit comments

Comments
 (0)