diff options
| author | Russell Keith-Magee <russell@keith-magee.com> | 2009-04-30 15:40:09 +0000 |
|---|---|---|
| committer | Russell Keith-Magee <russell@keith-magee.com> | 2009-04-30 15:40:09 +0000 |
| commit | 5e2d38465a661fc267676798d3aa4872e9da8265 (patch) | |
| tree | f1ed2888c0d1a731b2c5a44ff449408b24d23b15 /django/db/models/sql/subqueries.py | |
| parent | 17958fa7a9a757c2b0abcdc3f931a010584234f1 (diff) | |
Fixed #10847 -- Modified handling of extra() to use a masking strategy, rather than last-minute trimming. Thanks to Tai Lee for the report, and Alex Gaynor for his work on the patch.
This enables querysets with an extra clause to be used in an __in filter; as a side effect, it also means that as_sql() now returns the correct result for any query with an extra clause.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@10648 bcc190cf-cafb-0310-a4f2-bffc1f526a37
Diffstat (limited to 'django/db/models/sql/subqueries.py')
| -rw-r--r-- | django/db/models/sql/subqueries.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/django/db/models/sql/subqueries.py b/django/db/models/sql/subqueries.py index 4c62457c57..0cd393756d 100644 --- a/django/db/models/sql/subqueries.py +++ b/django/db/models/sql/subqueries.py @@ -178,7 +178,7 @@ class UpdateQuery(Query): # from other tables. query = self.clone(klass=Query) query.bump_prefix() - query.extra_select = {} + query.extra = {} query.select = [] query.add_fields([query.model._meta.pk.name]) must_pre_select = count > 1 and not self.connection.features.update_can_self_select @@ -409,7 +409,7 @@ class DateQuery(Query): self.select = [select] self.select_fields = [None] self.select_related = False # See #7097. - self.extra_select = {} + self.extra = {} self.distinct = True self.order_by = order == 'ASC' and [1] or [-1] |
