diff --git a/changes/1668.fix.md b/changes/1668.fix.md new file mode 100644 index 0000000000..744f014590 --- /dev/null +++ b/changes/1668.fix.md @@ -0,0 +1 @@ +Update the parameter of session-template update API to follow-up change of session-template create API. diff --git a/src/ai/backend/manager/api/session_template.py b/src/ai/backend/manager/api/session_template.py index 9294c49f69..93c319567f 100644 --- a/src/ai/backend/manager/api/session_template.py +++ b/src/ai/backend/manager/api/session_template.py @@ -269,7 +269,7 @@ async def put(request: web.Request, params: Any) -> web.Response: body = yaml.safe_load(params["payload"]) except (yaml.YAMLError, yaml.MarkedYAMLError): raise InvalidAPIParameters("Malformed payload") - for st in body["session_templates"]: + for st in body: template_data = check_task_template(st["template"]) name = st["name"] if "name" in st else template_data["metadata"]["name"] if "group_id" in st: