diff options
Diffstat (limited to 'django/db/models/sql/query.py')
| -rw-r--r-- | django/db/models/sql/query.py | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/django/db/models/sql/query.py b/django/db/models/sql/query.py index 33cc636b22..cf7566d771 100644 --- a/django/db/models/sql/query.py +++ b/django/db/models/sql/query.py @@ -748,6 +748,7 @@ class Query(BaseExpression): cur_model = source.related_model else: cur_model = source.remote_field.model + cur_model = cur_model._meta.concrete_model opts = cur_model._meta # Even if we're "just passing through" this model, we must add # both the current model's pk and the related reference field |
