mirror of
https://github.com/django/django.git
synced 2025-09-26 12:09:19 +00:00
Fixed #12608 -- No longer return inconsistent results when using values
and values_list
in conjunction with annotate
. Thanks, Charlie Leifer.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@12505 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
parent
c4699b0b8a
commit
5546430304
3 changed files with 6 additions and 1 deletions
|
@ -954,7 +954,8 @@ class ValuesListQuerySet(ValuesQuerySet):
|
|||
# If a field list has been specified, use it. Otherwise, use the
|
||||
# full list of fields, including extras and aggregates.
|
||||
if self._fields:
|
||||
fields = self._fields
|
||||
fields = list(self._fields) + filter(lambda f: f not in self._fields,
|
||||
aggregate_names)
|
||||
else:
|
||||
fields = names
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue