diff options
| author | Alex Gaynor <alex.gaynor@gmail.com> | 2010-10-09 16:51:34 +0000 |
|---|---|---|
| committer | Alex Gaynor <alex.gaynor@gmail.com> | 2010-10-09 16:51:34 +0000 |
| commit | 3234c7a1237535d6928f58e3b717bc94c88fcf66 (patch) | |
| tree | a0ca532eb38c02abaeaf1dda66d4c2b1497b555b | |
| parent | 560fedde4cf26eac23d393ab6a64a1ad6d8513bd (diff) | |
Fixed #14011 -- Doing a subquery with __in and an EmptyQuerySet no longer raises an Exception. This is actually just a test for this, it was fixed by [14084]. Thanks to skatei for the report and mk for the patch.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@14086 bcc190cf-cafb-0310-a4f2-bffc1f526a37
| -rw-r--r-- | tests/regressiontests/queries/tests.py | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/tests/regressiontests/queries/tests.py b/tests/regressiontests/queries/tests.py index 75653fc660..ab5369246d 100644 --- a/tests/regressiontests/queries/tests.py +++ b/tests/regressiontests/queries/tests.py @@ -87,3 +87,8 @@ class EmptyQuerySetTests(TestCase): def test_emptyqueryset_values(self): "#14366 -- calling .values() on an EmptyQuerySet and then cloning that should not cause an error" self.assertEqual(list(Number.objects.none().values('num').order_by('num')), []) + + def test_values_subquery(self): + self.assertQuerysetEqual( + Number.objects.filter(pk__in=Number.objects.none().values("pk")), [] + ) |
