Skip to content

Commit

Permalink
Merge pull request alejcas#11 from Cellebyte/master
Browse files Browse the repository at this point in the history
Fix folder creation
  • Loading branch information
Alejandro Casanovas authored Nov 4, 2018
2 parents 55d4ffb + 331e51f commit 455d152
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions pyo365/drive.py
Original file line number Diff line number Diff line change
Expand Up @@ -813,12 +813,13 @@ def create_child_folder(self, name, description=None):

url = self.build_url(self._endpoints.get('list_items').format(id=self.object_id))

data = {'name': name}
data = {'name': name,
'folder': {}}
if description:
data['description'] = description

response = self.con.post(url, data=data)
if not response:
if not response.ok:
return None

folder = response.json()
Expand Down

0 comments on commit 455d152

Please sign in to comment.