From 7bcd718a2954c2f1ff67bea84d79c7cd9a1d43a0 Mon Sep 17 00:00:00 2001 From: BonfaceKilz Date: Wed, 25 May 2022 21:36:25 +0300 Subject: Move sql for CRUD operations on case-attrs from gn2 to gn3 --- gn3/db/case_attributes.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'gn3') diff --git a/gn3/db/case_attributes.py b/gn3/db/case_attributes.py index 8eb2bf6..98fc58d 100644 --- a/gn3/db/case_attributes.py +++ b/gn3/db/case_attributes.py @@ -33,13 +33,13 @@ def insert_case_attribute_audit( "INSERT INTO caseattributes_audit " "(status, editor, json_diff_data) " "VALUES (%s, %s, %s)", - (status, author, data), + (status, author, data,), ) rowcount = cursor.rowcount - conn.commit() except Exception as _e: conn.rollback() raise MySQLdb.Error(_e) from _e + conn.commit() return rowcount @@ -55,7 +55,7 @@ def reject_case_attribute(conn: Any, case_attr_audit_id: int) -> int: (case_attr_audit_id,), ) rowcount = cursor.rowcount - conn.commit() + conn.commit() except Exception as _e: conn.rollback() raise MySQLdb.Error(_e) from _e -- cgit v1.2.3