From 76efd54df576d0869cd503ed750b938e09ac56a5 Mon Sep 17 00:00:00 2001 From: Iacopo Spalletti Date: Fri, 14 Aug 2020 16:48:12 +0200 Subject: [PATCH] Add missing field --- polymorphic/tests/migrations/0001_initial.py | 7 +++++++ polymorphic/tests/models.py | 1 + 2 files changed, 8 insertions(+) diff --git a/polymorphic/tests/migrations/0001_initial.py b/polymorphic/tests/migrations/0001_initial.py index 4707a36..38106a3 100644 --- a/polymorphic/tests/migrations/0001_initial.py +++ b/polymorphic/tests/migrations/0001_initial.py @@ -1450,6 +1450,13 @@ class Migration(migrations.Migration): to="tests.ParentModelWithManager", ), ), + migrations.AddField( + model_name="childmodelwithmanager", + name="field1", + field=models.CharField( + max_length=10, + ), + ), migrations.AddField( model_name="childmodelwithmanager", name="polymorphic_ctype", diff --git a/polymorphic/tests/models.py b/polymorphic/tests/models.py index 96e361f..494b98f 100644 --- a/polymorphic/tests/models.py +++ b/polymorphic/tests/models.py @@ -222,6 +222,7 @@ class ParentModelWithManager(PolymorphicModel): class ChildModelWithManager(PolymorphicModel): # Also test whether foreign keys receive the manager: + field1 = models.CharField(max_length=10) # needed as MyManager uses it fk = models.ForeignKey( ParentModelWithManager, on_delete=models.CASCADE, related_name="childmodel_set" )