1
0
mirror of https://github.com/django/django.git synced 2025-01-27 10:39:40 +00:00

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

Fixed in f19a4945e1191e1696f1ad8e6cdc6f939c702728.
This commit is contained in:
Mariusz Felisiak 2019-03-28 07:10:54 +01:00 committed by GitHub
parent 398afba084
commit 9ab1d55596
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -2782,6 +2782,9 @@ class ExcludeTests(TestCase):
annotation = Annotation.objects.create(name='annotation', tag=tag)
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):
"""