From e8feacf1db658ecccf7bb1d1688662e701ad37f5 Mon Sep 17 00:00:00 2001 From: Mike Bayer Date: Mon, 7 Jan 2008 18:52:02 +0000 Subject: - fixed an attribute history bug whereby assigning a new collection to a collection-based attribute which already had pending changes would generate incorrect history [ticket:922] - fixed delete-orphan cascade bug whereby setting the same object twice to a scalar attribute could log it as an orphan [ticket:925] - generative select.order_by(None) / group_by(None) was not managing to reset order by/group by criterion, fixed [ticket:924] --- lib/sqlalchemy/sql/expression.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'lib/sqlalchemy/sql/expression.py') diff --git a/lib/sqlalchemy/sql/expression.py b/lib/sqlalchemy/sql/expression.py index b3b04b678..3dc7242d7 100644 --- a/lib/sqlalchemy/sql/expression.py +++ b/lib/sqlalchemy/sql/expression.py @@ -2815,7 +2815,7 @@ class _SelectBaseMixin(object): form of this method instead to prevent this issue. """ - if clauses == [None]: + if len(clauses) == 1 and clauses[0] is None: self._order_by_clause = ClauseList() else: if getattr(self, '_order_by_clause', None): @@ -2833,7 +2833,7 @@ class _SelectBaseMixin(object): form of this method instead to prevent this issue. """ - if clauses == [None]: + if len(clauses) == 1 and clauses[0] is None: self._group_by_clause = ClauseList() else: if getattr(self, '_group_by_clause', None): -- cgit v1.2.1