aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMunyoki Kilyungi2022-08-30 20:25:36 +0300
committerBonfaceKilz2022-08-30 20:27:40 +0300
commit25d589e6a96c617cbb2b09b7838a0a7b4bb9f988 (patch)
tree29ca24e75d8d84188b76bfc1b136e6b281864266
parent1c384a1fa8af178ad8547edb65ca167602b7a64f (diff)
downloadgenenetwork2-25d589e6a96c617cbb2b09b7838a0a7b4bb9f988.tar.gz
Close a database connection only once
* wqflask/wqflask/database.py (database_connection): Close connection only once; otherwise an error is raised.
-rw-r--r--wqflask/wqflask/database.py1
1 files changed, 0 insertions, 1 deletions
diff --git a/wqflask/wqflask/database.py b/wqflask/wqflask/database.py
index 2063190c..4b05c926 100644
--- a/wqflask/wqflask/database.py
+++ b/wqflask/wqflask/database.py
@@ -44,7 +44,6 @@ def database_connection():
)
try:
yield connection
- connection.close()
except Exception:
connection.rollback()
raise