Skip to content

Commit

Permalink
adding async_requests_mode=False to overcome incomplete response from…
Browse files Browse the repository at this point in the history
… endpoint
  • Loading branch information
nicolasbisurgi authored and MariusWirtz committed Jun 5, 2023
1 parent 66aa9d2 commit 6105399
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions TM1py/Services/GitService.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,10 @@ def tm1project_delete(self):
def tm1project_put(self, tm1_project: TM1Project) -> TM1Project:
url = '/api/v1/!tm1project'
body_json = tm1_project.body

response = self._rest.PUT(url=url, data=body_json)

# we need to ensure that async_requests_mode=False for this specific request as the response will not include
# the Location field with the async_id.
response = self._rest.PUT(url=url, data=body_json, async_requests_mode=False)
return TM1Project.from_dict(response.json())

def git_init(self, git_url: str, deployment: str, username: str = None, password: str = None,
Expand Down

0 comments on commit 6105399

Please sign in to comment.