Fixed test_one_to_one_with_inheritance. Added required on_delete attribute to OneToOneField field.

This commit is contained in:
Mariusz Felisiak 2017-01-23 15:53:40 +01:00
parent d686b2cb15
commit 0181abc42c
No known key found for this signature in database
GPG Key ID: 2EF56372BA48CD1B

View File

@ -14,7 +14,7 @@ from tests.test_multitable_inheritance import ChildModel
# Regression test for #4290 # Regression test for #4290
class ChildAssociatedModel(RESTFrameworkModel): class ChildAssociatedModel(RESTFrameworkModel):
child_model = models.OneToOneField(ChildModel) child_model = models.OneToOneField(ChildModel, on_delete=models.CASCADE)
child_name = models.CharField(max_length=100) child_name = models.CharField(max_length=100)