Commit b720753
fix: ReportStrategy 价格字段类型改为 Union[str,int,float] 以兼容分析器 float 输出
上游 api/v1/schemas/history.py 中 ReportStrategy 的 ideal_buy/secondary_buy/
stop_loss/take_profit 均为 Optional[str],但分析器实际输出 float(如 1399.87),
导致 Pydantic v2 校验失败并报 internal_error。
修复方案:与 src/schemas/report_schema.py 保持一致,改为 Optional[Union[str,int,float]]。
已在 ensemble 模式(600519)下验证通过,expert_panel 置信度加权正常运行。1 parent f671646 commit b720753
1 file changed
Lines changed: 5 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
12 | | - | |
| 12 | + | |
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
| |||
140 | 140 | | |
141 | 141 | | |
142 | 142 | | |
143 | | - | |
144 | | - | |
145 | | - | |
146 | | - | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
147 | 147 | | |
148 | 148 | | |
149 | 149 | | |
| |||
0 commit comments