From d054ff2725ce759b257eb1e9a9b0efa0aca2bea0 Mon Sep 17 00:00:00 2001 From: ethanfel Date: Sun, 4 Jan 2026 17:03:31 +0100 Subject: [PATCH] Update tab_batch.py --- tab_batch.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/tab_batch.py b/tab_batch.py index b704f9b..0f4371c 100644 --- a/tab_batch.py +++ b/tab_batch.py @@ -1,5 +1,6 @@ import streamlit as st import random +import copy # <--- NEW IMPORT from utils import DEFAULTS, save_json, load_json from history_tree import HistoryTree @@ -289,8 +290,10 @@ def render_batch_processor(data, file_path, json_files, current_dir, selected_fi tree_data = data.get("history_tree", {}) htree = HistoryTree(tree_data) - snapshot_payload = data.copy() + # --- FIX: DEEPCOPY TO PREVENT SHARED REFERENCES --- + snapshot_payload = copy.deepcopy(data) if "history_tree" in snapshot_payload: del snapshot_payload["history_tree"] + # -------------------------------------------------- htree.commit(snapshot_payload, note=commit_msg if commit_msg else "Batch Update")