From 838b78c490baf893a62df5866bcfd99a12208e0a Mon Sep 17 00:00:00 2001 From: Eunhak Lee <lee@enak.kr> Date: Sun, 8 Dec 2024 00:31:57 +0900 Subject: [PATCH] =?UTF-8?q?fix:=20transactions=20=ED=85=8C=EC=9D=B4?= =?UTF-8?q?=EB=B8=94=EC=97=90=20insert=20=EB=8A=94=20=EB=B0=B1=EC=97=94?= =?UTF-8?q?=EB=93=9C=EA=B0=80=20=ED=95=B4=EC=A4=8C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- push_to_db.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/push_to_db.py b/push_to_db.py index c7b19b1..8af327a 100644 --- a/push_to_db.py +++ b/push_to_db.py @@ -108,7 +108,7 @@ def match_part_obj_into_db(_part, part_type): def finalize_transaction(_cursor, _transaction_id, _user_id, _combination_id): - _cursor.execute("INSERT INTO transactions (id, user_id, combination_id) VALUES (%s, %s, %s);", (_transaction_id, _user_id, _combination_id)) + _cursor.execute("UPDATE transactions SET combination_id=%s WHERE id=%s and user_id=%s;", (_combination_id, _transaction_id, _user_id,)) def func(): -- GitLab