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:
2026-03-01 21:03:13 +01:00
parent 1b8d13f7c4
commit 04b9ed0e27
4 changed files with 18 additions and 8 deletions

View File

@@ -13,6 +13,7 @@ def _delete_nodes(htree, data, file_path, node_ids):
if 'history_tree_backup' not in data:
data['history_tree_backup'] = []
data['history_tree_backup'].append(copy.deepcopy(htree.to_dict()))
data['history_tree_backup'] = data['history_tree_backup'][-10:]
for nid in node_ids:
htree.nodes.pop(nid, None)
for b, tip in list(htree.branches.items()):