Commits

mtre...@bcc190cf-cafb-0310-a4f2-bffc1f526a37  committed 4ebbb0f

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

  • Participants
  • Parent commits 5c08e4c

Comments (0)

Files changed (1)

File tests/regressiontests/many_to_one_regress/models.py

 >>> 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.
+
 """}