From 416f9f1874b5dc4ecff5bdea982e5fd3a79b524d Mon Sep 17 00:00:00 2001 From: xxm Date: Tue, 18 Aug 2026 10:18:44 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20promote=E5=8A=A0source=5Fstrategy?= =?UTF-8?q?=E2=86=92sector=20fallback=E2=80=94=E2=80=94unknown=E6=97=B6?= =?UTF-8?q?=E7=94=A8sector,=E4=B8=8D=E5=86=8D=E6=8E=A8=E9=80=81unknown?= =?UTF-8?q?=E7=AD=96=E7=95=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- deploy/profile-scripts/promote_candidates.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/deploy/profile-scripts/promote_candidates.py b/deploy/profile-scripts/promote_candidates.py index 9586cca9..549c309f 100644 --- a/deploy/profile-scripts/promote_candidates.py +++ b/deploy/profile-scripts/promote_candidates.py @@ -61,6 +61,10 @@ def main(): # 2026-08-11:读取候选 sector(用于 p_oversold RR 例外) cand_sector = str(r[6] or "").strip() if len(r) > 6 else "" source_strategy = str(r[8] or "").strip() if len(r) > 8 else "" + # 2026-08-18 fallback:source_strategy 为 unknown/空时用 candidates.sector 作来源 + # (自选退出回归候选 sector 是正确策略标签,但 source_strategy 可能 inherited unknown) + if not source_strategy or source_strategy == "unknown": + source_strategy = cand_sector if cand_sector and cand_sector != "unknown" else "unknown" "" exists = conn.execute( "SELECT id FROM holding_strategies WHERE code=? AND status='active'", (code,)