Skip to content

Commit

Permalink
fix: revert changing the create_project signature
Browse files Browse the repository at this point in the history
  • Loading branch information
NiklasKoehneckeAA committed Jan 30, 2025
1 parent d7b180d commit d62ccbf
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/intelligence_layer/connectors/studio/studio.py
Original file line number Diff line number Diff line change
Expand Up @@ -288,7 +288,7 @@ def _get_project(self, project_name: str) -> str | None:

def create_project(
self,
project_name: str,
project: str,
description: Optional[str] = None,
reuse_existing: bool = False,
) -> str:
Expand All @@ -297,7 +297,7 @@ def create_project(
Projects are uniquely identified by the user provided name.
Args:
project_name: User provided name of the project.
project: User provided name of the project.
description: Description explaining the usage of the project. Defaults to None.
reuse_existing: Reuse project with specified name if already existing. Defaults to False.
Expand All @@ -306,7 +306,7 @@ def create_project(
The ID of the newly created project.
"""
url = urljoin(self.url, "/api/projects")
data = StudioProject(name=project_name, description=description)
data = StudioProject(name=project, description=description)
response = requests.post(
url,
data=data.model_dump_json(),
Expand All @@ -315,7 +315,7 @@ def create_project(
match response.status_code:
case 409:
if reuse_existing:
fetched_project = self._get_project(project_name)
fetched_project = self._get_project(project)
assert (
fetched_project is not None
), "Project already exists but not allowed to be used."
Expand Down

0 comments on commit d62ccbf

Please sign in to comment.