mirror of
https://github.com/django/django.git
synced 2025-06-11 06:29:13 +00:00
[2.0.x] Reverted "[1.11.x] Refs #28856 -- Fixed caching of a GenericForeignKey pointing to a model that uses more than one level of MTI."
This reverts commit a2aea4521d5e3cf8c76ef17e6edafee1c87bbf0a as it was committed by mistake.
This commit is contained in:
parent
6b01ff80b2
commit
a06828cd2e
@ -17,6 +17,3 @@ Bugfixes
|
|||||||
|
|
||||||
* Fixed incorrect foreign key constraint name for models with quoted
|
* Fixed incorrect foreign key constraint name for models with quoted
|
||||||
``db_table`` (:ticket:`28876`).
|
``db_table`` (:ticket:`28876`).
|
||||||
* Fixed a regression in caching of a ``GenericForeignKey`` when the referenced
|
|
||||||
model instance uses more than one level of multi-table inheritance
|
|
||||||
(:ticket:`28856`).
|
|
||||||
|
@ -38,11 +38,6 @@ class Restaurant(Place):
|
|||||||
return "Restaurant: %s" % self.name
|
return "Restaurant: %s" % self.name
|
||||||
|
|
||||||
|
|
||||||
class Cafe(Restaurant):
|
|
||||||
def __str__(self):
|
|
||||||
return "Cafe: %s" % self.name
|
|
||||||
|
|
||||||
|
|
||||||
class Address(models.Model):
|
class Address(models.Model):
|
||||||
street = models.CharField(max_length=80)
|
street = models.CharField(max_length=80)
|
||||||
city = models.CharField(max_length=50)
|
city = models.CharField(max_length=50)
|
||||||
|
@ -5,10 +5,9 @@ from django.forms.models import modelform_factory
|
|||||||
from django.test import TestCase, skipIfDBFeature
|
from django.test import TestCase, skipIfDBFeature
|
||||||
|
|
||||||
from .models import (
|
from .models import (
|
||||||
A, Address, B, Board, C, Cafe, CharLink, Company, Contact, Content, D,
|
A, Address, B, Board, C, CharLink, Company, Contact, Content, D, Developer,
|
||||||
Developer, Guild, HasLinkThing, Link, Node, Note, OddRelation1,
|
Guild, HasLinkThing, Link, Node, Note, OddRelation1, OddRelation2,
|
||||||
OddRelation2, Organization, Person, Place, Related, Restaurant, Tag, Team,
|
Organization, Person, Place, Related, Restaurant, Tag, Team, TextLink,
|
||||||
TextLink,
|
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
@ -55,11 +54,6 @@ class GenericRelationTests(TestCase):
|
|||||||
charlink = CharLink.objects.latest('pk')
|
charlink = CharLink.objects.latest('pk')
|
||||||
self.assertIs(charlink.content_object, charlink.content_object)
|
self.assertIs(charlink.content_object, charlink.content_object)
|
||||||
|
|
||||||
cafe = Cafe.objects.create()
|
|
||||||
CharLink.objects.create(content_object=cafe)
|
|
||||||
charlink = CharLink.objects.latest('pk')
|
|
||||||
self.assertIs(charlink.content_object, charlink.content_object)
|
|
||||||
|
|
||||||
def test_q_object_or(self):
|
def test_q_object_or(self):
|
||||||
"""
|
"""
|
||||||
SQL query parameters for generic relations are properly
|
SQL query parameters for generic relations are properly
|
||||||
|
Loading…
x
Reference in New Issue
Block a user