summaryrefslogtreecommitdiff
path: root/django/db/models/query.py
diff options
context:
space:
mode:
authorRussell Keith-Magee <russell@keith-magee.com>2010-03-20 15:37:26 +0000
committerRussell Keith-Magee <russell@keith-magee.com>2010-03-20 15:37:26 +0000
commit3a5dae5ed3ee10d7c86dc7a110f1edb60490cd99 (patch)
tree223f8f7c9ef7b9f95213c7c8b47e1865a9f8709a /django/db/models/query.py
parent10d4094b86721da690fcb3c9bc89b7a0089dfd5c (diff)
downloaddjango-3a5dae5ed3ee10d7c86dc7a110f1edb60490cd99.tar.gz
Fixed #12851 -- Corrected the interaction of defer() with select_related(). Thanks to ruosteinen for the report.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@12817 bcc190cf-cafb-0310-a4f2-bffc1f526a37
Diffstat (limited to 'django/db/models/query.py')
-rw-r--r--django/db/models/query.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/django/db/models/query.py b/django/db/models/query.py
index 8adf0d555c..d0b605db84 100644
--- a/django/db/models/query.py
+++ b/django/db/models/query.py
@@ -1208,7 +1208,7 @@ def get_cached_row(klass, row, index_start, using, max_depth=0, cur_depth=0,
next = None
# Recursively retrieve the data for the related object
cached_row = get_cached_row(f.rel.to, row, index_end, using,
- max_depth, cur_depth+1, next)
+ max_depth, cur_depth+1, next, only_load=only_load)
# If the recursive descent found an object, populate the
# descriptor caches relevant to the object
if cached_row:
@@ -1237,7 +1237,7 @@ def get_cached_row(klass, row, index_start, using, max_depth=0, cur_depth=0,
next = requested[f.related_query_name()]
# Recursively retrieve the data for the related object
cached_row = get_cached_row(model, row, index_end, using,
- max_depth, cur_depth+1, next, local_only=True)
+ max_depth, cur_depth+1, next, only_load=only_load, local_only=True)
# If the recursive descent found an object, populate the
# descriptor caches relevant to the object
if cached_row: