Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

[1.1.X] Fixed #12851 -- Corrected the loading of values when select_r…

…elated() is used on inherited models. Thanks to phxx for the report and test case.

Backport of r13054 from trunk.

git-svn-id: http://code.djangoproject.com/svn/django/branches/releases/1.1.X@13055 bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information...
commit 2eb832a7e65b1c24904c140fa024169524d101f8 1 parent 6f4563a
Russell Keith-Magee authored April 30, 2010
2  django/db/models/sql/query.py
@@ -621,7 +621,7 @@ def deferred_to_data(self, target, callback):
621 621
             # models.
622 622
             workset = {}
623 623
             for model, values in seen.iteritems():
624  
-                for field in model._meta.local_fields:
  624
+                for field in model._meta.fields:
625 625
                     if field in values:
626 626
                         continue
627 627
                     add_to_dict(workset, model, field)
25  tests/regressiontests/select_related_regress/models.py
@@ -65,6 +65,9 @@ class Client(models.Model):
@@ -170,8 +173,28 @@ def __unicode__(self):

0 notes on commit 2eb832a

Please sign in to comment.
Something went wrong with that request. Please try again.