Skip to content

Commit

Permalink
Fixed parent folder problem (#117)
Browse files Browse the repository at this point in the history
  • Loading branch information
tsej authored Apr 6, 2022
1 parent 3b4eee2 commit 4e986a6
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/sasctl/_services/folders.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,13 +41,17 @@ def create_folder(cls, name, parent=None, description=None):
-------
"""
parent = cls.get_folder(parent)
if parent is not None:
parent = cls.get_folder(parent)

if parent is None:
raise ValueError('`parent` folder does not exist')

body = {
'name': name,
'description': description,
'folderType': 'folder',
'parentFolderUri': parent.id if parent else None,
'parentFolderUri': '/folders/folders/'+parent.id if parent else None,
}

return cls.post(
Expand Down

0 comments on commit 4e986a6

Please sign in to comment.