diff options
| author | Anssi Kääriäinen <akaariai@gmail.com> | 2013-11-05 19:26:59 +0200 |
|---|---|---|
| committer | Anssi Kääriäinen <akaariai@gmail.com> | 2013-11-07 12:57:02 +0200 |
| commit | e7b61e571788b7d3efc1ba704dd908f828340255 (patch) | |
| tree | 574b3736ccff838abbffacba65b39d2fd368f43e | |
| parent | 6fe2b001dba45134d7c10729c57959995e241a88 (diff) | |
Fixed #11320 -- exclude() too aggressive in join promotion
| -rw-r--r-- | tests/queries/tests.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/tests/queries/tests.py b/tests/queries/tests.py index a0987b47df..02c7b33480 100644 --- a/tests/queries/tests.py +++ b/tests/queries/tests.py @@ -1797,6 +1797,10 @@ class Queries6Tests(TestCase): 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): |
