fix(maps): 画布因果连线零绘制(节点双键注册) + 战略回顾 total_hold 未初始化 500
ci/woodpecker/push/main Pipeline was successful
ci/woodpecker/push/main Pipeline was successful
- StrategyLayer.vue: setNodeRef 双键注册(渲染键 layer-index 与数据键 layer:目标名),$el 归一化为 DOM,卸载时清理数据键 - maps.py: total_hold 初始化 0 + summary.hold 透出(修复 review?level=strategic 500 UnboundLocalError) - tests: 新增 test_maps_review_hold_20261022.py(待核/普通/空/NULL/无level 五例,负对照已验证会失败) 任务: project-20261022-cma-map-canvas-connections-not-drawn-fullstack 阶段A候选件;未 push、未部署(等阶段B放行)
This commit is contained in:
committed by
Hermes CI Fix
parent
4cad2b73c4
commit
986dec516e
@@ -1305,6 +1305,7 @@ def get_map_review(map_id: int, level: Optional[str] = None, db: Session = Depen
|
||||
total_ok = 0
|
||||
total_warn = 0
|
||||
total_err = 0
|
||||
total_hold = 0 # C1 数据待核计数(此前漏初始化 → 命中 hold_reason 即 UnboundLocalError → review 500)
|
||||
total_obj_count = 0
|
||||
focus_items = []
|
||||
|
||||
@@ -1444,6 +1445,7 @@ def get_map_review(map_id: int, level: Optional[str] = None, db: Session = Depen
|
||||
"green": total_ok,
|
||||
"yellow": total_warn,
|
||||
"red": total_err,
|
||||
"hold": total_hold,
|
||||
"health_score": round(total_ok / total_obj_count * 100, 1) if total_obj_count > 0 else 0,
|
||||
},
|
||||
"focus_items": focus_items,
|
||||
|
||||
Reference in New Issue
Block a user