From 23a0721d8d2a23a68089f8335d8242dd948f2f9c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=BE=9D=E7=91=AA=E8=B2=93?= Date: Wed, 15 Mar 2023 23:23:01 +0800 Subject: [PATCH] Added assert in the be function in the "accounting.utils.cast" module, to insure the correctness of the expression received. --- src/accounting/utils/cast.py | 1 + 1 file changed, 1 insertion(+) diff --git a/src/accounting/utils/cast.py b/src/accounting/utils/cast.py index 0908b65..86a0e46 100644 --- a/src/accounting/utils/cast.py +++ b/src/accounting/utils/cast.py @@ -31,6 +31,7 @@ def be(expression: t.Any) -> sa.BinaryExpression: :param expression: The binary expression. :return: The binary expression itself. """ + assert isinstance(expression, sa.BinaryExpression) return expression