This commit is contained in:
2026-07-21 19:22:50 +08:00
parent b374a541ea
commit 7683ebb186
65 changed files with 5067 additions and 1741 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