Skip to content

Commit

Permalink
Fix compatibility with older servers
Browse files Browse the repository at this point in the history
  • Loading branch information
jvstme committed Jan 20, 2025
1 parent 4e9c7c9 commit 852c0e3
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/dstack/api/server/_fleets.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,10 @@ def list(self, project_name: str) -> List[Fleet]:

def get(self, project_name: str, name: str) -> Fleet:
body = GetFleetRequest(name=name)
resp = self._request(f"/api/project/{project_name}/fleets/get", body=body.json())
resp = self._request(
f"/api/project/{project_name}/fleets/get",
body=body.json(exclude={"id"}), # `id` is not supported in pre-0.18.36 servers
)
return parse_obj_as(Fleet.__response__, resp.json())

def get_plan(
Expand Down

0 comments on commit 852c0e3

Please sign in to comment.