Skip to content

Commit e3839f9

Browse files
authored
Update deployment_handler.py
1 parent 1c1702b commit e3839f9

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

ads/aqua/extension/deployment_handler.py

+6-3
Original file line numberDiff line numberDiff line change
@@ -45,12 +45,15 @@ def get(self, id: Union[str, List[str]] = None):
4545
url_parse = urlparse(self.request.path)
4646
paths = url_parse.path.strip("/")
4747
if paths.startswith("aqua/deployments/config"):
48-
if not id or not isinstance(id, (list, str)):
48+
if not id or not isinstance(id, str):
4949
raise HTTPError(
5050
400,
51-
f"The request to {self.request.path} must include either a single model ID or a list of model IDs.",
51+
f"Invalid request format for {self.request.path}. "
52+
"Expected a single model ID or a comma-separated list of model IDs.",
5253
)
53-
return self.get_deployment_config(id)
54+
return self.get_deployment_config(
55+
model_id=id.split(",") if "," in id else id
56+
)
5457
elif paths.startswith("aqua/deployments/shapes"):
5558
return self.list_shapes()
5659
elif paths.startswith("aqua/deployments"):

0 commit comments

Comments
 (0)