diff options
author | Mike Bayer <mike_mp@zzzcomputing.com> | 2007-05-20 18:16:10 +0000 |
---|---|---|
committer | Mike Bayer <mike_mp@zzzcomputing.com> | 2007-05-20 18:16:10 +0000 |
commit | 8405d1267c1e271df20d960367db4683ec02decf (patch) | |
tree | 98af5702633e43c4235fc4ac10c0008c13f33605 /lib/sqlalchemy/sql.py | |
parent | 555ab611f159d40af9653e8dcd53bf92fd2bd592 (diff) | |
download | sqlalchemy-8405d1267c1e271df20d960367db4683ec02decf.tar.gz |
restored comparison of 1-element clause list -> ClauseElement, which was broken in [changeset:2620]
Diffstat (limited to 'lib/sqlalchemy/sql.py')
-rw-r--r-- | lib/sqlalchemy/sql.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/sqlalchemy/sql.py b/lib/sqlalchemy/sql.py index 35cd30b30..9a93474dc 100644 --- a/lib/sqlalchemy/sql.py +++ b/lib/sqlalchemy/sql.py @@ -1964,7 +1964,9 @@ class ClauseList(ClauseElement): including a comparison of all the clause items. """ - if isinstance(other, ClauseList) and len(self.clauses) == len(other.clauses): + if not isinstance(other, ClauseList) and len(self.clauses) == 1: + return self.clauses[0].compare(other) + elif isinstance(other, ClauseList) and len(self.clauses) == len(other.clauses): for i in range(0, len(self.clauses)): if not self.clauses[i].compare(other.clauses[i]): return False |