1
0
mirror of https://github.com/django/django.git synced 2025-10-31 09:41:08 +00:00

[1.5.x] Fix #19524 -- Incorrect caching of parents of unsaved model instances.

Thanks qcwxezdas for the report. Refs #13839.

Backport of e9c24be.
This commit is contained in:
Aymeric Augustin
2012-12-28 23:16:13 +01:00
parent be4259004f
commit 5097d3c5fa
5 changed files with 48 additions and 4 deletions

View File

@@ -90,7 +90,6 @@ class Inner4Tabular(models.Model):
dummy = models.IntegerField(help_text="Awesome tabular help text is awesome.")
holder = models.ForeignKey(Holder4)
# Models for #12749
class Person(models.Model):
@@ -133,6 +132,7 @@ class Chapter(models.Model):
# Models for #16838
class CapoFamiglia(models.Model):
name = models.CharField(max_length=100)
@@ -170,6 +170,17 @@ class ChildModel2(models.Model):
def get_absolute_url(self):
return '/child_model2/'
# Models for #19524
class LifeForm(models.Model):
pass
class ExtraTerrestrial(LifeForm):
name = models.CharField(max_length=100)
class Sighting(models.Model):
et = models.ForeignKey(ExtraTerrestrial)
place = models.CharField(max_length=100)
# Other models