条件单客户端勾选按 sim / live 分组,没有对应模式则不显示该组。
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -635,6 +635,10 @@ def api_cond_order_candidates():
|
||||
has_pos = isinstance(brief, list) and len(brief) > 0
|
||||
locked = bool(snap.get("cond_order_locked"))
|
||||
selectable = bool(row.get("online")) and not has_pos and not locked
|
||||
inst = snap.get("instance") if isinstance(snap.get("instance"), dict) else {}
|
||||
mode = str(inst.get("mode") or "").strip().lower()
|
||||
if mode not in ("sim", "live"):
|
||||
mode = ""
|
||||
out.append(
|
||||
{
|
||||
"id": row.get("id"),
|
||||
@@ -643,6 +647,7 @@ def api_cond_order_candidates():
|
||||
"has_position": has_pos,
|
||||
"cond_order_locked": locked,
|
||||
"selectable": selectable,
|
||||
"mode": mode,
|
||||
"error": row.get("error") or "",
|
||||
}
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user