mirror of
https://github.com/django/django.git
synced 2025-09-27 04:29:17 +00:00
Fixed #29067 -- Fixed regression in QuerySet.values_list(..., flat=True) followed by annotate().
This commit is contained in:
parent
d0b44c44ef
commit
3187c89d6f
3 changed files with 10 additions and 2 deletions
|
@ -7,7 +7,6 @@ import operator
|
|||
import warnings
|
||||
from collections import OrderedDict, namedtuple
|
||||
from functools import lru_cache
|
||||
from itertools import chain
|
||||
|
||||
from django.conf import settings
|
||||
from django.core import exceptions
|
||||
|
@ -173,7 +172,8 @@ class FlatValuesListIterable(BaseIterable):
|
|||
def __iter__(self):
|
||||
queryset = self.queryset
|
||||
compiler = queryset.query.get_compiler(queryset.db)
|
||||
return chain.from_iterable(compiler.results_iter(chunked_fetch=self.chunked_fetch, chunk_size=self.chunk_size))
|
||||
for row in compiler.results_iter(chunked_fetch=self.chunked_fetch, chunk_size=self.chunk_size):
|
||||
yield row[0]
|
||||
|
||||
|
||||
class QuerySet:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue