Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

[1.2.X] Fixed #14011 -- Doing a subquery with __in and an EmptyQueryS…

…et no longer raises an Exception. This is actually just a test for this, it was fixed by [14085]. Thanks to skatei for the report and mk for the patch.

git-svn-id: http://code.djangoproject.com/svn/django/branches/releases/1.2.X@14087 bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information...
commit b3e02d19ecf0be17fa18db553be3e7d4734df60e 1 parent bb66cb8
@alex alex authored
Showing with 5 additions and 0 deletions.
  1. +5 −0 tests/regressiontests/queries/tests.py
View
5 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")), []
+ )
Please sign in to comment.
Something went wrong with that request. Please try again.