feat: desk ia

This commit is contained in:
OpenSquared
2026-06-29 17:16:57 +02:00
parent 69418ab650
commit f7acca2152
2 changed files with 3 additions and 3 deletions

View File

@@ -1158,7 +1158,7 @@ def auto_assign_template(event_id: int) -> dict:
confidence = float(recommendation.get("confidence") or 0.0)
if tmpl_id and confidence >= 0.6:
conn.execute("UPDATE market_events SET template_id = ? WHERE id = ?", (tmpl_id, event_id))
conn.execute("UPDATE market_events SET auto_template_id = ? WHERE id = ?", (tmpl_id, event_id))
conn.commit()
row = conn.execute("SELECT name FROM causal_graph_templates WHERE id = ?", (tmpl_id,)).fetchone()
conn.close()
@@ -1215,7 +1215,7 @@ Règles : coef intermédiaire ∈ [-5,5] ; coef output en pips, |val| ∈ [30,20
json.dumps(graph_json),
))
new_id = cur.lastrowid
conn2.execute("UPDATE market_events SET template_id = ? WHERE id = ?", (new_id, event_id))
conn2.execute("UPDATE market_events SET auto_template_id = ? WHERE id = ?", (new_id, event_id))
conn2.commit()
conn2.close()

View File

@@ -806,7 +806,7 @@ def init_db():
("sub_type", "TEXT DEFAULT NULL"),
("origin", "TEXT DEFAULT NULL"),
("source_refs", "TEXT DEFAULT '[]'"),
("template_id", "INTEGER DEFAULT NULL"),
("auto_template_id", "INTEGER DEFAULT NULL"),
]:
try:
c.execute(f"ALTER TABLE market_events ADD COLUMN {_col} {_def}")