Fixed #23396 -- Ensured ValueQuerySets are not checked by check_related_objects.

This commit is contained in:
Gabe Jackson 2014-09-02 15:30:53 +02:00 committed by Tim Graham
parent 3a34e45fdb
commit 0e16c3e3cd
3 changed files with 35 additions and 15 deletions

View file

@ -3487,6 +3487,14 @@ class RelatedLookupTypeTests(TestCase):
with self.assertNumQueries(0):
ObjectB.objects.filter(objecta__in=ObjectA.objects.all())
def test_values_queryset_lookup(self):
"""
#23396 - Ensure ValueQuerySets are not checked for compatibility with the lookup field
"""
self.assertQuerysetEqual(ObjectB.objects.filter(
objecta__in=ObjectB.objects.all().values_list('pk')
).order_by('pk'), ['<ObjectB: ob>', '<ObjectB: pob>'])
class Ticket14056Tests(TestCase):
def test_ticket_14056(self):