diff options
| author | Malcolm Tredinnick <malcolm.tredinnick@gmail.com> | 2009-01-08 05:49:03 +0000 |
|---|---|---|
| committer | Malcolm Tredinnick <malcolm.tredinnick@gmail.com> | 2009-01-08 05:49:03 +0000 |
| commit | c5bdfab9ae17953645812dc1ffc7f0b50354b7c5 (patch) | |
| tree | 2b93b396230c44b539de4f562e876a4df519a294 /django/db/models/sql/query.py | |
| parent | d068ad0c01be9bb085c86a4e0c4dd047a85ce18d (diff) | |
Fixed #9985 -- qs.values_list(...).values(...) was constructing incorrect SQL.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@9717 bcc190cf-cafb-0310-a4f2-bffc1f526a37
Diffstat (limited to 'django/db/models/sql/query.py')
| -rw-r--r-- | django/db/models/sql/query.py | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/django/db/models/sql/query.py b/django/db/models/sql/query.py index 876099cb1f..b12912461f 100644 --- a/django/db/models/sql/query.py +++ b/django/db/models/sql/query.py @@ -1538,6 +1538,15 @@ class BaseQuery(object): """ return not (self.low_mark or self.high_mark) + def clear_select_fields(self): + """ + Clears the list of fields to select (but not extra_select columns). + Some queryset types completely replace any existing list of select + columns. + """ + self.select = [] + self.select_fields = [] + def add_fields(self, field_names, allow_m2m=True): """ Adds the given (model) fields to the select set. The field names are |
