mirror of
https://github.com/django/django.git
synced 2025-10-29 00:26:07 +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:
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user