fix: 修复生成按钮 PUT 状态限制 + 进度弹窗错误显示 #377

Merged
xiaoxia merged 1 commits from fix/generation-put-status-restriction into develop 2026-07-15 21:20:37 +08:00
@@ -955,12 +955,16 @@ const EditingPlanner: React.FC = () => {
let planId = loadedPlanId;
if (planId) {
// 已有计划 → 更新配置
await updateEditPlan(planId, {
config,
total_duration: totalDuration,
status: "editing",
});
// 已有计划 → 更新配置(不传 status,避免非 draft 状态被后端拒绝)
try {
await updateEditPlan(planId, {
config,
total_duration: totalDuration,
});
} catch (updateErr) {
// 非 draft 状态(如 failed/editingPUT 会被拒绝,忽略继续生成
console.warn("[计划更新跳过]", updateErr);
}
} else {
// 无计划 → 创建新计划
const plan = await createEditPlan({