Add missing field
parent
0950478fcd
commit
76efd54df5
|
|
@ -1450,6 +1450,13 @@ class Migration(migrations.Migration):
|
||||||
to="tests.ParentModelWithManager",
|
to="tests.ParentModelWithManager",
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
migrations.AddField(
|
||||||
|
model_name="childmodelwithmanager",
|
||||||
|
name="field1",
|
||||||
|
field=models.CharField(
|
||||||
|
max_length=10,
|
||||||
|
),
|
||||||
|
),
|
||||||
migrations.AddField(
|
migrations.AddField(
|
||||||
model_name="childmodelwithmanager",
|
model_name="childmodelwithmanager",
|
||||||
name="polymorphic_ctype",
|
name="polymorphic_ctype",
|
||||||
|
|
|
||||||
|
|
@ -222,6 +222,7 @@ class ParentModelWithManager(PolymorphicModel):
|
||||||
|
|
||||||
class ChildModelWithManager(PolymorphicModel):
|
class ChildModelWithManager(PolymorphicModel):
|
||||||
# Also test whether foreign keys receive the manager:
|
# Also test whether foreign keys receive the manager:
|
||||||
|
field1 = models.CharField(max_length=10) # needed as MyManager uses it
|
||||||
fk = models.ForeignKey(
|
fk = models.ForeignKey(
|
||||||
ParentModelWithManager, on_delete=models.CASCADE, related_name="childmodel_set"
|
ParentModelWithManager, on_delete=models.CASCADE, related_name="childmodel_set"
|
||||||
)
|
)
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue