diff options
Diffstat (limited to 'django/db/models/sql')
| -rw-r--r-- | django/db/models/sql/compiler.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/django/db/models/sql/compiler.py b/django/db/models/sql/compiler.py index c7455ecceb..3e61f8a925 100644 --- a/django/db/models/sql/compiler.py +++ b/django/db/models/sql/compiler.py @@ -713,7 +713,7 @@ class SQLCompiler(object): _, _, _, joins, _ = self.query.setup_joins([related_field_name], opts, root_alias) alias = joins[-1] - from_parent = issubclass(model, opts.model) + from_parent = issubclass(model, opts.model) and model is not opts.model klass_info = { 'model': model, 'field': f, |
