From c18dad4a77b0147b0f689e8dd3d29503699ed063 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lera=20Elvo=C3=A9?= Date: Sat, 6 Dec 2025 22:19:12 +0300 Subject: [PATCH] raise on exception in connection, fix operator not being considered in QueryBuilder --- app/db.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/db.py b/app/db.py index 4cf56fd..5a66b9e 100644 --- a/app/db.py +++ b/app/db.py @@ -31,6 +31,7 @@ class DB: except Exception as e: if in_transaction and self._connection: conn.rollback() + raise finally: if in_transaction: self._transaction_depth -= 1 @@ -126,7 +127,7 @@ class DB: def where(self, condition, operator = "="): if isinstance(condition, dict): for key, value in condition.items(): - self._where.append((key, "=", value)) + self._where.append((key, operator, value)) elif isinstance(condition, list): for c in condition: self._where.append(c)