Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

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
  • Loading branch information...
commit 7a198f51050adb2f626a5ef422a3bfab7a2305e3 1 parent 2d6d20d
@freakboy3742 freakboy3742 authored
Showing with 2 additions and 1 deletion.
  1. +2 −1  tests/regressiontests/serializers_regress/models.py
View
3  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)

0 comments on commit 7a198f5

Please sign in to comment.
Something went wrong with that request. Please try again.