爆款/拆镜生成简化3个步骤 | 项目生成可携带附件控制

This commit is contained in:
2026-07-21 14:01:08 +08:00
parent 40efcf55cf
commit 79c09151ba
60 changed files with 4250 additions and 924 deletions
@@ -59,6 +59,18 @@ async def get_project_for_user(
project = result.scalar_one_or_none()
if not project:
raise HTTPException(status_code=404, detail=config.project_not_found_message)
if config.expected_flow_version:
actual_flow_version = str(getattr(project, "flow_version", None) or "v1")
if actual_flow_version != config.expected_flow_version:
raise HTTPException(
status_code=409,
detail={
"message": "项目流程版本与当前接口版本不匹配",
"project_id": project.id,
"flow_version": actual_flow_version,
"expected_flow_version": config.expected_flow_version,
},
)
return project