diff --git a/redbrick/organization/__init__.py b/redbrick/organization/__init__.py index 08d1a357..5adabaa8 100644 --- a/redbrick/organization/__init__.py +++ b/redbrick/organization/__init__.py @@ -95,8 +95,8 @@ def create_workspace(self, name: str, exists_okay: bool = False) -> RBWorkspace: """ Create a workspace within the organization. - This method creates an organization in a similar fashion to the - quickstart on the RedBrick Ai create project page. + This method creates a worspace in a similar fashion to the + quickstart on the RedBrick AI create workspace page. Parameters -------------- @@ -119,8 +119,8 @@ def create_workspace(self, name: str, exists_okay: bool = False) -> RBWorkspace: ) except ValueError as error: raise Exception( - "Project with same name exists, try setting exists_okay=True to" - + " return this project instead of creating a new one" + "Workspace with same name exists, try setting exists_okay=True to" + + " return this workspace instead of creating a new one" ) from error return RBWorkspace(self.context, self._org_id, workspace_data["workspaceId"]) @@ -137,8 +137,8 @@ def create_project_advanced( """ Create a project within the organization. - This method creates an organization in a similar fashion to the - quickstart on the RedBrick Ai create project page. + This method creates a project in a similar fashion to the + quickstart on the RedBrick AI create project page. Parameters -------------- @@ -224,8 +224,8 @@ def create_project( """ Create a project within the organization. - This method creates an organization in a similar fashion to the - quickstart on the RedBrick Ai create project page. + This method creates a project in a similar fashion to the + quickstart on the RedBrick AI create project page. Parameters -------------- diff --git a/redbrick/repo/workspace.py b/redbrick/repo/workspace.py index 781327e2..9e110ea3 100644 --- a/redbrick/repo/workspace.py +++ b/redbrick/repo/workspace.py @@ -63,15 +63,15 @@ def create_workspace( Raise an exception if workspace already exists. """ query = """ - mutation sdkCreateWorkspaceSDK($orgId: UUID!, $workspaceName: String!){ - createWorkspace(orgId: $orgId, workspaceName: $workspaceName){ + mutation sdkCreateWorkspaceSDK($orgId: UUID!, $name: String!){ + createWorkspace(orgId: $orgId, name: $name){ orgId workspaceId name } } """ - variables = {"orgId": org_id, "workspaceName": workspace_name} + variables = {"orgId": org_id, "name": workspace_name} response: Dict[str, Dict] = self.client.execute_query(query, variables) if response.get("createWorkspace"): return response["createWorkspace"]