summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnts Aasma <ants.aasma@gmail.com>2009-04-06 07:03:13 +0000
committerAnts Aasma <ants.aasma@gmail.com>2009-04-06 07:03:13 +0000
commit9ffd3ddb00d782723f7faf7e6e67804751daafc8 (patch)
tree2c2a23700c36e2db839f206c61e4d2e51e77b329
parentf77c9f950f361af9188598718bd61ae147b5d2f6 (diff)
downloadsqlalchemy-9ffd3ddb00d782723f7faf7e6e67804751daafc8.tar.gz
- Fixed the evaluator not being able to evaluate IS NULL clauses.
- Added evaluator tests to orm/alltests.py
-rw-r--r--CHANGES2
-rw-r--r--lib/sqlalchemy/orm/evaluator.py2
-rw-r--r--test/orm/alltests.py2
3 files changed, 5 insertions, 1 deletions
diff --git a/CHANGES b/CHANGES
index bb921bb52..bd853aac4 100644
--- a/CHANGES
+++ b/CHANGES
@@ -8,6 +8,8 @@ CHANGES
=====
- orm
+ - Fixed the evaluator not being able to evaluate IS NULL clauses.
+
- Fixed the "set collection" function on "dynamic" relations to
initiate events correctly. Previously a collection could only
be assigned to a pending parent instance, otherwise modified
diff --git a/lib/sqlalchemy/orm/evaluator.py b/lib/sqlalchemy/orm/evaluator.py
index 4611dd91b..9076f610d 100644
--- a/lib/sqlalchemy/orm/evaluator.py
+++ b/lib/sqlalchemy/orm/evaluator.py
@@ -68,7 +68,7 @@ class EvaluatorCompiler(object):
if operator is operators.is_:
def evaluate(obj):
return eval_left(obj) == eval_right(obj)
- if operator is operators.isnot:
+ elif operator is operators.isnot:
def evaluate(obj):
return eval_left(obj) != eval_right(obj)
elif operator in _straight_ops:
diff --git a/test/orm/alltests.py b/test/orm/alltests.py
index a95eca762..9458ca523 100644
--- a/test/orm/alltests.py
+++ b/test/orm/alltests.py
@@ -41,6 +41,8 @@ def suite():
'orm.onetoone',
'orm.dynamic',
+ 'orm.evaluator',
+
'orm.deprecations',
)
alltests = unittest.TestSuite()