summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorRussell Keith-Magee <russell@keith-magee.com>2010-04-23 14:25:29 +0000
committerRussell Keith-Magee <russell@keith-magee.com>2010-04-23 14:25:29 +0000
commitd9a0fd48ba1a4ac04c917099785d35700bef6ccc (patch)
treed2b2769f840d17f1573050b6fe6734b3ad2dfa9a /tests
parent5866875547515bd8a1f7082404414602cf112355 (diff)
Fixed #11764 -- Added a missing set of parentheses in a call calculating the select_related tables. Thanks to aurelio for the report and original patch, and wogan for the updated patch.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@13019 bcc190cf-cafb-0310-a4f2-bffc1f526a37
Diffstat (limited to 'tests')
-rw-r--r--tests/regressiontests/model_inheritance_regress/models.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/tests/regressiontests/model_inheritance_regress/models.py b/tests/regressiontests/model_inheritance_regress/models.py
index c669b2337a..41895182f9 100644
--- a/tests/regressiontests/model_inheritance_regress/models.py
+++ b/tests/regressiontests/model_inheritance_regress/models.py
@@ -56,6 +56,9 @@ class ParkingLot3(Place):
class Supplier(models.Model):
restaurant = models.ForeignKey(Restaurant)
+class Wholesaler(Supplier):
+ retailer = models.ForeignKey(Supplier,related_name='wholesale_supplier')
+
class Parent(models.Model):
created = models.DateTimeField(default=datetime.datetime.now)
@@ -268,6 +271,10 @@ True
>>> Supplier.objects.filter(restaurant=Restaurant(name='xx', address='yy'))
[]
+# Regression test for #11764.
+>>> for w in Wholesaler.objects.all().select_related():
+... print w
+
# Regression test for #7853
# If the parent class has a self-referential link, make sure that any updates
# to that link via the child update the right table.