mirror of
https://github.com/django/django.git
synced 2025-10-24 14:16:09 +00:00
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
This commit is contained in:
@@ -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.
|
||||
|
||||
Reference in New Issue
Block a user