summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMariusz Felisiak <felisiak.mariusz@gmail.com>2019-03-28 07:10:54 +0100
committerGitHub <noreply@github.com>2019-03-28 07:10:54 +0100
commit9ab1d5559681d3adde4fcfc98a19a7396ed6a42e (patch)
tree65c452d86e75d0d5a948dfe8c55d62cd66ecb7fa
parent398afba084679f1055926f6f91bd33fe124a92c5 (diff)
Refs #18726 -- Added test for excluding circular related fields with F() expression.
Fixed in f19a4945e1191e1696f1ad8e6cdc6f939c702728.
-rw-r--r--tests/queries/tests.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/tests/queries/tests.py b/tests/queries/tests.py
index 373a0e224a..2c404342e4 100644
--- a/tests/queries/tests.py
+++ b/tests/queries/tests.py
@@ -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):
"""