feat: instrument analysis
This commit is contained in:
@@ -1176,7 +1176,7 @@ def list_analyses(
|
||||
|
||||
rows = conn.execute(f"""
|
||||
SELECT a.*, e.name as event_name, e.category, e.start_date,
|
||||
t.name as template_name
|
||||
t.name as template_name, t.graph_json as template_graph_json
|
||||
FROM causal_event_analyses a
|
||||
LEFT JOIN market_events e ON e.id = a.market_event_id
|
||||
LEFT JOIN causal_graph_templates t ON t.id = a.template_id
|
||||
@@ -1194,6 +1194,10 @@ def list_analyses(
|
||||
d[f] = json.loads(d[f] or "{}")
|
||||
except Exception:
|
||||
d[f] = {}
|
||||
try:
|
||||
d["graph_json"] = json.loads(d.get("template_graph_json") or "{}")
|
||||
except Exception:
|
||||
d["graph_json"] = {}
|
||||
result.append(d)
|
||||
return result
|
||||
|
||||
|
||||
Reference in New Issue
Block a user