From: Ants Aasma Date: Thu, 29 May 2008 02:12:06 +0000 (+0000) Subject: Not implemenented binary ops also raise UnevaluatableError X-Git-Tag: rel_0_5beta1~16 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c194844692808e795489f29d198dc88ac3ea3fdb;p=thirdparty%2Fsqlalchemy%2Fsqlalchemy.git Not implemenented binary ops also raise UnevaluatableError --- diff --git a/lib/sqlalchemy/orm/evaluator.py b/lib/sqlalchemy/orm/evaluator.py index c4517e4947..3469a24c8c 100644 --- a/lib/sqlalchemy/orm/evaluator.py +++ b/lib/sqlalchemy/orm/evaluator.py @@ -78,6 +78,8 @@ class EvaluatorCompiler(object): if left_val is None or right_val is None: return None return operator(eval_left(obj), eval_right(obj)) + else: + raise UnevaluatableError("Cannot evaluate %s with operator %s" % (type(clause).__name__, clause.operator)) return evaluate def visit_unary(self, clause):