From d266f2183c554f2d412a6872a59e12e9e59e5a2b Mon Sep 17 00:00:00 2001 From: admtracksteel Date: Tue, 16 Jun 2026 00:42:34 +0000 Subject: [PATCH] fix: pipeline visual timeline shows no-data message for USD/XAU instead of BTC history --- app.py | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/app.py b/app.py index 6d82b12..2671df9 100644 --- a/app.py +++ b/app.py @@ -950,11 +950,19 @@ def pipeline_visual_asset(asset): for n in nodes: n["status"] = "idle" - recent_runs = [{ - "started_at": r["started_at"], - "decio_decision": r.get("decio_decision", "?"), - "status": r.get("status", "completed") - } for r in last_5] + # Para USD/XAU, não mostrar histórico BTC — ativo ainda não executou pipeline + if asset != 'btc': + recent_runs = [{ + "started_at": "—", + "decio_decision": f"Execute o pipeline de {asset_labels.get(asset, asset)} para ver o histórico", + "status": "no-data" + }] + else: + recent_runs = [{ + "started_at": r["started_at"], + "decio_decision": r.get("decio_decision", "?"), + "status": r.get("status", "completed") + } for r in last_5] return jsonify({"nodes": nodes, "recent_runs": recent_runs, "asset": asset}) except Exception as e: