Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Fixed #11320 -- exclude() too aggressive in join promotion

  • Loading branch information...
commit e7b61e571788b7d3efc1ba704dd908f828340255 1 parent 6fe2b00
Anssi Kääriäinen akaariai authored
Showing with 4 additions and 0 deletions.
  1. +4 −0 tests/queries/tests.py
4 tests/queries/tests.py
View
@@ -1797,6 +1797,10 @@ def test_ticket3739(self):
q1 = Tag.objects.order_by('name')
self.assertIsNot(q1, q1.all())
+ def test_ticket_11320(self):
+ qs = Tag.objects.exclude(category=None).exclude(category__name='foo')
+ self.assertEqual(str(qs.query).count(' INNER JOIN '), 1)
+
class RawQueriesTests(TestCase):
def setUp(self):
Please sign in to comment.
Something went wrong with that request. Please try again.