diff options
| author | Malcolm Tredinnick <malcolm.tredinnick@gmail.com> | 2009-01-08 05:51:15 +0000 |
|---|---|---|
| committer | Malcolm Tredinnick <malcolm.tredinnick@gmail.com> | 2009-01-08 05:51:15 +0000 |
| commit | cc76b89c5967e77fcbb4f0772526387066822497 (patch) | |
| tree | d3266621e72b3054ecc2b235b9d3178d005fabdd /django/db/models/sql/query.py | |
| parent | fe9cd02f383841de6a758cd2f796bb93f2cfabc1 (diff) | |
[1.0.X] Fixed #9985 -- qs.values_list(...).values(...) was constructing incorrect SQL.
Backport of r9717 from trunk.
git-svn-id: http://code.djangoproject.com/svn/django/branches/releases/1.0.X@9718 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 bc32ead930..1d4001bab0 100644 --- a/django/db/models/sql/query.py +++ b/django/db/models/sql/query.py @@ -1535,6 +1535,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 |
