fix(backend): P0 #1911后自动创建默认模板避免剪辑页卡死 #1914
Reference in New Issue
Block a user
Delete Branch "fix/p0-auto-create-default-template"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
问题
前端 #1911 删除模板选择UI(6步→5步),改为后台自动选第一个有效模板。真实用户账号下 templates 表没有属于该用户的模板时,前端 GET /templates?valid_only=true 返回空数组 → selectedTemplate 永远为空 → 选片请求不发 → 页面永远转圈。
修改
_get_or_create_default_template_id():无参时为用户查找/创建默认模板,再查最新 plan;模板无历史 plan 时返回400(需要先有一次预览生成)测试
Refs #1899, 前端 #1911
🚀 预览环境已部署
🗑️ 预览环境已清理
PR #1914 已关闭或合并,对应的预览环境已被清理。