From 9957fc144a5faa399f0f6d548fb2ff87d01c08fe Mon Sep 17 00:00:00 2001 From: jasquat <2487833+jasquat@users.noreply.github.com> Date: Tue, 18 Jun 2024 15:08:44 -0400 Subject: [PATCH] update the hash column in json data table on duplicate entry w/ burnettk (#1750) Co-authored-by: jasquat --- .../src/spiffworkflow_backend/models/json_data.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spiffworkflow-backend/src/spiffworkflow_backend/models/json_data.py b/spiffworkflow-backend/src/spiffworkflow_backend/models/json_data.py index c1344f01..7ba0fdc4 100644 --- a/spiffworkflow-backend/src/spiffworkflow_backend/models/json_data.py +++ b/spiffworkflow-backend/src/spiffworkflow_backend/models/json_data.py @@ -67,7 +67,7 @@ class JsonDataModel(SpiffworkflowBaseDBModel): on_duplicate_key_stmt = None if current_app.config["SPIFFWORKFLOW_BACKEND_DATABASE_TYPE"] == "mysql": insert_stmt = mysql_insert(JsonDataModel).values(list_of_dicts) - on_duplicate_key_stmt = insert_stmt.on_duplicate_key_update(data=insert_stmt.inserted.data) + on_duplicate_key_stmt = insert_stmt.on_duplicate_key_update(hash=insert_stmt.inserted.hash) else: insert_stmt = postgres_insert(JsonDataModel).values(list_of_dicts) on_duplicate_key_stmt = insert_stmt.on_conflict_do_nothing(index_elements=["hash"])