diff options
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/expressions/tests.py | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/tests/expressions/tests.py b/tests/expressions/tests.py index 5cf9dd1ea5..89c6a7c8de 100644 --- a/tests/expressions/tests.py +++ b/tests/expressions/tests.py @@ -1905,6 +1905,13 @@ class ExistsTests(TestCase): ) self.assertNotIn('ORDER BY', captured_sql) + def test_negated_empty_exists(self): + manager = Manager.objects.create() + qs = Manager.objects.filter( + ~Exists(Manager.objects.none()) & Q(pk=manager.pk) + ) + self.assertSequenceEqual(qs, [manager]) + class FieldTransformTests(TestCase): |
