mirror of
https://github.com/django/django.git
synced 2025-10-29 00:26:07 +00:00
Fixed #10127 -- Corrected handling of select_related() in annotate() calls. Thanks to Sylvain Pasche <sylvain.pasche@gmail.com> for the report and test case.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@9805 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
@@ -280,8 +280,8 @@ class QuerySet(object):
|
||||
|
||||
for row in self.query.results_iter():
|
||||
if fill_cache:
|
||||
obj, aggregate_start = get_cached_row(self.model, row,
|
||||
index_start, max_depth, requested=requested)
|
||||
obj, _ = get_cached_row(self.model, row,
|
||||
index_start, max_depth, requested=requested)
|
||||
else:
|
||||
# omit aggregates in object creation
|
||||
obj = self.model(*row[index_start:aggregate_start])
|
||||
|
||||
Reference in New Issue
Block a user