From 25d589e6a96c617cbb2b09b7838a0a7b4bb9f988 Mon Sep 17 00:00:00 2001 From: Munyoki Kilyungi Date: Tue, 30 Aug 2022 20:25:36 +0300 Subject: Close a database connection only once * wqflask/wqflask/database.py (database_connection): Close connection only once; otherwise an error is raised. --- wqflask/wqflask/database.py | 1 - 1 file changed, 1 deletion(-) 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 -- cgit v1.2.3