Fixed #28101 -- Fixed a regression with nested __in subquery lookups and to_field.

Thanks Kristian Klette for the report and Tim for the help.
This commit is contained in:
Simon Charette 2017-04-22 17:04:02 -04:00
parent 3f1ba76851
commit 8ef35468b6
4 changed files with 26 additions and 6 deletions

View file

@ -326,6 +326,7 @@ class Query:
if hasattr(obj, '_setup_query'):
obj._setup_query()
obj.context = self.context.copy()
obj._forced_pk = getattr(self, '_forced_pk', False)
return obj
def add_context(self, key, value):