Fix 4 bugs: SQL conflict handling, HTML escaping, backup cap, safe int cast
- sync_to_db: use ON CONFLICT for duplicate sequence numbers - history_tree: html.escape() for Graphviz DOT labels - tab_timeline_ng: cap history_tree_backup to 10 entries - tab_batch_ng: add _safe_int() helper for VACE settings Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
3
utils.py
3
utils.py
@@ -210,7 +210,8 @@ def sync_to_db(db, project_name: str, file_path: Path, data: dict) -> None:
|
||||
now = time.time()
|
||||
db.conn.execute(
|
||||
"INSERT INTO sequences (data_file_id, sequence_number, data, updated_at) "
|
||||
"VALUES (?, ?, ?, ?)",
|
||||
"VALUES (?, ?, ?, ?) "
|
||||
"ON CONFLICT(data_file_id, sequence_number) DO UPDATE SET data=excluded.data, updated_at=excluded.updated_at",
|
||||
(df_id, seq_num, json.dumps(item), now),
|
||||
)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user