mirror of
https://github.com/django/django.git
synced 2025-10-28 08:06:09 +00:00
Fixed #36149 -- Allowed subquery values against tuple exact and in lookups.
Non-tuple exact and in lookups have specialized logic for subqueries that can be adapted to properly assign select mask if unspecified and ensure the number of involved members are matching on both side of the operator.
This commit is contained in:
committed by
Sarah Boyce
parent
0597e8ad1e
commit
41239fe34d
@@ -1958,10 +1958,6 @@ class QuerySet(AltersData):
|
||||
self._known_related_objects.setdefault(field, {}).update(objects)
|
||||
|
||||
def resolve_expression(self, *args, **kwargs):
|
||||
if self._fields and len(self._fields) > 1:
|
||||
# values() queryset can only be used as nested queries
|
||||
# if they are set up to select only a single field.
|
||||
raise TypeError("Cannot use multi-field values as a filter value.")
|
||||
query = self.query.resolve_expression(*args, **kwargs)
|
||||
query._db = self._db
|
||||
return query
|
||||
|
||||
Reference in New Issue
Block a user