Unverified Kaydet (Commit) 9ab1d555 authored tarafından Mariusz Felisiak's avatar Mariusz Felisiak Kaydeden (comit) GitHub

Refs #18726 -- Added test for excluding circular related fields with F() expression.

Fixed in f19a4945.
üst 398afba0
...@@ -2782,6 +2782,9 @@ class ExcludeTests(TestCase): ...@@ -2782,6 +2782,9 @@ class ExcludeTests(TestCase):
annotation = Annotation.objects.create(name='annotation', tag=tag) annotation = Annotation.objects.create(name='annotation', tag=tag)
self.assertEqual(Annotation.objects.exclude(tag__note__note=F('name')).get(), annotation) self.assertEqual(Annotation.objects.exclude(tag__note__note=F('name')).get(), annotation)
def test_exclude_with_circular_fk_relation(self):
self.assertEqual(ObjectB.objects.exclude(objecta__objectb__name=F('name')).count(), 0)
class ExcludeTest17600(TestCase): class ExcludeTest17600(TestCase):
""" """
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment