From 7a198f51050adb2f626a5ef422a3bfab7a2305e3 Mon Sep 17 00:00:00 2001 From: Russell Keith-Magee Date: Thu, 12 Jul 2007 11:24:16 +0000 Subject: [PATCH] Fixed #3770 -- Remove null=True tag from OneToOne serialization test. OneToOne fields can't have a value of null. git-svn-id: http://code.djangoproject.com/svn/django/trunk@5659 bcc190cf-cafb-0310-a4f2-bffc1f526a37 --- tests/regressiontests/serializers_regress/models.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tests/regressiontests/serializers_regress/models.py b/tests/regressiontests/serializers_regress/models.py index 268fa052e6d..f8bcb34d06b 100644 --- a/tests/regressiontests/serializers_regress/models.py +++ b/tests/regressiontests/serializers_regress/models.py @@ -117,7 +117,8 @@ class M2MData(models.Model): data = models.ManyToManyField(Anchor, null=True) class O2OData(models.Model): - data = models.OneToOneField(Anchor, null=True) + # One to one field can't be null, since it is a PK. + data = models.OneToOneField(Anchor) class FKSelfData(models.Model): data = models.ForeignKey('self', null=True)