From 27dccf65911d1997c14e04e4d23956923e470840 Mon Sep 17 00:00:00 2001 From: saas-backend-agent Date: Mon, 7 Sep 2026 20:38:35 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20#1769=20=E6=99=BA=E8=83=BD=E5=89=AA?= =?UTF-8?q?=E8=BE=91=20Step2=20=E7=B4=A0=E6=9D=90=E5=8A=A0=E8=BD=BD=20400?= =?UTF-8?q?=20=E9=94=99=E8=AF=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 根因:模板 f7578c059c2e4dfca2236eb86cb6808a 是无效测试模板 - is_active=false(已失效) - template_clip_configs=0(无片段配置) - template_segments=0(无旧版片段配置) - 修复:_get_template_segments 添加详细错误日志,便于排查 - 前端应过滤 is_active=false 的模板 - 用户应选择 clip_config_count > 0 的有效模板 --- apps/api/app/api/routes/templates_editor/clips.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/apps/api/app/api/routes/templates_editor/clips.py b/apps/api/app/api/routes/templates_editor/clips.py index fed9a3152..32a0cc038 100755 --- a/apps/api/app/api/routes/templates_editor/clips.py +++ b/apps/api/app/api/routes/templates_editor/clips.py @@ -460,6 +460,11 @@ def _get_template_segments( except Exception: logger.warning("旧模板系统查询segments失败", exc_info=True) + # 所有途径都失败:模板没有片段配置(可能是无效测试模板) + logger.error( + "模板无片段配置:template_id=%s(可能是 is_active=false 的无效模板)", + template_id, + ) return []