aboutsummaryrefslogtreecommitdiff
path: root/gn3/db/case_attributes.py
diff options
context:
space:
mode:
authorMunyoki Kilyungi2022-08-23 13:26:58 +0300
committerBonfaceKilz2022-08-23 13:30:33 +0300
commit2035e96b06654f3395cf01823a4f02c10f401667 (patch)
tree549a64d7b6d4c31814ed84ab73c00e865a088520 /gn3/db/case_attributes.py
parent79c0e0933b4f252c3d76323891ae943a7ca6fd58 (diff)
downloadgenenetwork3-2035e96b06654f3395cf01823a4f02c10f401667.tar.gz
Remove conn.commit() and conn.rollback()
* gn3/db/__init__.py (update): Delete conn.commit() and conn.rollback() (insert): Ditto. * gn3/db/case_attributes.py (insert_case_attribute_audit): Ditto. (reject_case_attribute): Ditto. (approve_case_attribute): Ditto. * gn3/db/sample_data.py (update_sample_data): Ditto. (delete_sample_data): Ditto. (insert_sample_data): Ditto.
Diffstat (limited to 'gn3/db/case_attributes.py')
-rw-r--r--gn3/db/case_attributes.py6
1 files changed, 0 insertions, 6 deletions
diff --git a/gn3/db/case_attributes.py b/gn3/db/case_attributes.py
index 98fc58d..1d82f00 100644
--- a/gn3/db/case_attributes.py
+++ b/gn3/db/case_attributes.py
@@ -37,9 +37,7 @@ def insert_case_attribute_audit(
)
rowcount = cursor.rowcount
except Exception as _e:
- conn.rollback()
raise MySQLdb.Error(_e) from _e
- conn.commit()
return rowcount
@@ -55,9 +53,7 @@ def reject_case_attribute(conn: Any, case_attr_audit_id: int) -> int:
(case_attr_audit_id,),
)
rowcount = cursor.rowcount
- conn.commit()
except Exception as _e:
- conn.rollback()
raise MySQLdb.Error(_e) from _e
return rowcount
@@ -125,8 +121,6 @@ def approve_case_attribute(conn: Any, case_attr_audit_id: int) -> int:
(case_attr_audit_id,),
)
rowcount = cursor.rowcount
- conn.commit()
except Exception as _e:
- conn.rollback()
raise MySQLdb.Error(_e) from _e
return rowcount