Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/dstack/_internal/server/schemas/projects.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from typing import Annotated, List, Optional
from typing import Annotated, List

from pydantic import Field

Expand All @@ -8,7 +8,7 @@

class CreateProjectRequest(CoreModel):
project_name: str
is_public: Optional[bool] = False
is_public: bool = False


class DeleteProjectsRequest(CoreModel):
Expand Down
4 changes: 2 additions & 2 deletions src/dstack/api/server/_projects.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from typing import List, Optional
from typing import List

from pydantic import parse_obj_as

Expand All @@ -17,7 +17,7 @@ def list(self) -> List[Project]:
resp = self._request("/api/projects/list")
return parse_obj_as(List[Project.__response__], resp.json())

def create(self, project_name: str, is_public: Optional[bool] = False) -> Project:
def create(self, project_name: str, is_public: bool = False) -> Project:
body = CreateProjectRequest(project_name=project_name, is_public=is_public)
resp = self._request("/api/projects/create", body=body.json())
return parse_obj_as(Project.__response__, resp.json())
Expand Down
Loading