Skip to content

Commit ce6385b

Browse files
author
Francisco
committed
fix(deployments): add trailing slash to list and deactivate_all endpoints
1 parent d4171ae commit ce6385b

1 file changed

Lines changed: 5 additions & 2 deletions

File tree

src/projectdavid/clients/deployments_client.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -182,7 +182,7 @@ def list(self) -> DeploymentListResponse:
182182
logging_utility.info("DeploymentsClient: listing active deployments")
183183
try:
184184
response = self.client.get(
185-
f"{self.training_url}/v1/deployments",
185+
f"{self.training_url}/v1/deployments/",
186186
)
187187
response.raise_for_status()
188188
return DeploymentListResponse.model_validate(response.json())
@@ -218,11 +218,14 @@ def deactivate_base(
218218
"DeploymentsClient: deactivating base model: %s", base_model_id
219219
)
220220
try:
221+
221222
response = self.client.delete(
222223
f"{self.training_url}/v1/deployments/base/{base_model_id}",
223224
)
225+
224226
response.raise_for_status()
225227
return DeploymentDeactivationResponse.model_validate(response.json())
228+
226229
except httpx.HTTPStatusError as e:
227230
logging_utility.error(
228231
"HTTP %d deactivating base model %s: %s",
@@ -279,7 +282,7 @@ def deactivate_all(self) -> DeactivateAllResponse:
279282
)
280283
try:
281284
response = self.client.delete(
282-
f"{self.training_url}/v1/deployments",
285+
f"{self.training_url}/v1/deployments/",
283286
)
284287
response.raise_for_status()
285288
return DeactivateAllResponse.model_validate(response.json())

0 commit comments

Comments
 (0)