fix(admin): save published models as a new draft and allow deleting them
Editing a published model tried to update a non-draft row, so the save collapsed into a generic constraint error. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -0,0 +1,19 @@
|
||||
# 后台已发布模型另存草稿并删除
|
||||
|
||||
- 基线:`origin/staging` `dac6b7fae`
|
||||
- 分支:`codex/model-admin-draft-delete-20261020`
|
||||
- 记录:BUG-1398
|
||||
|
||||
## 做了什么
|
||||
|
||||
编辑已发布或已下线模型时,保存写入下一版草稿,不改当前线上行。同一模型已有草稿时,再次保存更新那份草稿。
|
||||
|
||||
模型版本可以删除。草稿、已发布、已下线都从列表消失。还有其他已发布模型时,不能删除当前默认模型。已经绑定被删版本的会话之后不能继续提问。更换下拉里的供应商模型时,显示名跟着新模型走。
|
||||
|
||||
## 测试
|
||||
|
||||
- `tsc --noEmit`:0 错。
|
||||
- 改动文件 `eslint`:0 error。
|
||||
- `admin-model-management-ui-contract`、`admin-auth`、`high-risk-billing-routes-contract`:27 pass,0 fail,0 cancelled。
|
||||
- `database-billing-admin`:1 pass。其中删除默认模型命中 `model_default_required`,无权限删除命中 `admin_permission_denied`。
|
||||
- 未在浏览器里打开 staging 后台。这一步要等代码推上去并部署之后,用已登录的管理账号点保存和删除。
|
||||
@@ -13,6 +13,7 @@
|
||||
|
||||
- [三份修复单整合与独立验收](PROGRESS-three-fixes-integration-20260925.md) — 2026-09-25,人物档案优先,报告与西洋盘并行;Node 22 / Linux 全量对照与断言三栏为交付硬门槛。
|
||||
- [双 agent 自动循环试点](TASK-agent-loop-pilot-20261013.md) — 2026-10-13,Claude(本开发机)规划验收 + Grok Build(产品负责人本地电脑)执行,Gitea issue 标签交接;待产品负责人做 T0/T1。
|
||||
- [后台已发布模型可另存草稿并删除](PROGRESS-model-admin-draft-delete-20261020.md) — 2026-10-20,直接执行(BUG-1398)。
|
||||
|
||||
## 状态板
|
||||
|
||||
|
||||
Reference in New Issue
Block a user