Browse files

Added a test from kcarnold to show that #7498 is fixed. Refs #7498.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@8609 bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information...
1 parent d70c890 commit 900178d79594898f1d924c69800d48b6232bc41f @malcolmt malcolmt committed Aug 27, 2008
Showing with 5 additions and 0 deletions.
  1. +5 −0 tests/regressiontests/many_to_one_regress/models.py
View
5 tests/regressiontests/many_to_one_regress/models.py
@@ -151,4 +151,9 @@ def __unicode__(self):
>>> Category.objects.filter(record__left_set__right__category__name='Second').order_by('name')
[<Category: First>, <Category: Second>]
+>>> c2 = Child.objects.create(name="Grandchild", parent=c)
+Traceback (most recent call last):
+ ...
+ValueError: Cannot assign "<Child: Child object>": "Child.parent" must be a "Parent" instance.
+
"""}

0 comments on commit 900178d

Please sign in to comment.