Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Fixed #18785 -- Added Test join trimming regression

The regression was caused by patch to ticket #15316 and was fixed by a
patch to #10790.
  • Loading branch information...
commit 84909377f2f2eea07ab8bf398dafc69e2d736b50 1 parent fa7cb4e
@akaariai akaariai authored
Showing with 11 additions and 0 deletions.
  1. +11 −0 tests/queries/tests.py
View
11 tests/queries/tests.py
@@ -2852,3 +2852,14 @@ def test_double_subquery_in(self):
qs = LeafB.objects.filter(pk__in=joins)
self.assertQuerysetEqual(
qs, [lfb1], lambda x: x)
+
+class Ticket18785Tests(unittest.TestCase):
+ def test_ticket_18785(self):
+ # Test join trimming from ticket18785
+ qs = Item.objects.exclude(
+ note__isnull=False
+ ).filter(
+ name='something', creator__extra__isnull=True
+ ).order_by()
+ self.assertEquals(1, str(qs.query).count('INNER JOIN'))
+ self.assertEquals(0, str(qs.query).count('OUTER JOIN'))
Please sign in to comment.
Something went wrong with that request. Please try again.