Fixed #22050 -- Fixed defer fields on proxy related models.

This commit is contained in:
Lovas Bence 2014-02-15 12:24:20 +01:00 committed by Tim Graham
parent 815e7a5721
commit 9385aa3198
3 changed files with 20 additions and 2 deletions

View file

@ -585,7 +585,7 @@ class Query(object):
must_include = {orig_opts.concrete_model: set([orig_opts.pk])}
for field_name in field_names:
parts = field_name.split(LOOKUP_SEP)
cur_model = self.model
cur_model = self.model._meta.concrete_model
opts = orig_opts
for name in parts[:-1]:
old_model = cur_model