From cdfdcf4b70bebfc68871df885387790c6afbc23c Mon Sep 17 00:00:00 2001 From: Anubhav Joshi Date: Sun, 10 Aug 2014 18:23:37 +0530 Subject: Fixed #23266 -- Prevented queries caused by type checking lookup values Small modifications done by committer. --- tests/queries/tests.py | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'tests') diff --git a/tests/queries/tests.py b/tests/queries/tests.py index 380d64b8f9..e7dd7fab74 100644 --- a/tests/queries/tests.py +++ b/tests/queries/tests.py @@ -3461,6 +3461,10 @@ class RelatedLookupTypeTests(TestCase): # parent objects self.assertQuerysetEqual(ObjectC.objects.exclude(childobjecta=self.oa), out_c) + # Test for #23226 + with self.assertNumQueries(0): + ObjectB.objects.filter(objecta__in=ObjectA.objects.all()) + class Ticket14056Tests(TestCase): def test_ticket_14056(self): -- cgit v1.3