mirror of
https://github.com/django/django.git
synced 2025-08-03 18:38:50 +00:00
Fixed #23396 -- Ensured ValueQuerySets are not checked by check_related_objects.
This commit is contained in:
parent
3a34e45fdb
commit
0e16c3e3cd
3 changed files with 35 additions and 15 deletions
|
@ -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):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue