fix: 修正持仓 worker 中 bool 优先级导致 .get 报错。
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
+2
-1
@@ -83,7 +83,8 @@ def start_position_worker(
|
||||
payload = refresh_fn()
|
||||
if payload:
|
||||
position_hub.broadcast("positions", payload)
|
||||
connected = bool((payload or {}).get("ctp_status") or {}).get("connected")
|
||||
ctp_st = (payload or {}).get("ctp_status") or {}
|
||||
connected = bool(ctp_st.get("connected"))
|
||||
in_session = bool((payload or {}).get("trading_session"))
|
||||
rows = (payload or {}).get("rows") or []
|
||||
has_sl_tp = any(
|
||||
|
||||
Reference in New Issue
Block a user