diff --git a/astrbot/dashboard/routes/config.py b/astrbot/dashboard/routes/config.py index 9ec24d254d..3c37a2b788 100644 --- a/astrbot/dashboard/routes/config.py +++ b/astrbot/dashboard/routes/config.py @@ -95,7 +95,7 @@ def _validate_template_list(value, meta, path_key, errors, validate_fn) -> None: validate_fn( item, template_meta.get("items", {}), - path=f"{item_path}.", + path=f"{path_key}.templates.{template_key}.", ) diff --git a/astrbot/dashboard/routes/util.py b/astrbot/dashboard/routes/util.py index 1056198158..d08af03eed 100644 --- a/astrbot/dashboard/routes/util.py +++ b/astrbot/dashboard/routes/util.py @@ -16,6 +16,7 @@ def get_schema_item(schema: dict | None, key_path: str) -> dict | None: 同时支持: - 扁平 schema(直接 key 命中) - 嵌套 object schema({type: "object", items: {...}}) + - template_list schema(.templates.