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")), [] + )