mirror of
https://github.com/django/django.git
synced 2025-12-03 08:32:59 +00:00
Fixed #28549 -- Fixed QuerySet.defer() with super and subclass fields.
Previously, deferring fields in different classes didn't omit the superclass' deferred field. Thanks Simon Charette for the suggested fix.
This commit is contained in:
parent
e5bd585c6e
commit
84b7cb7df0
2 changed files with 6 additions and 1 deletions
|
|
@ -649,7 +649,7 @@ class Query:
|
|||
# models.
|
||||
workset = {}
|
||||
for model, values in seen.items():
|
||||
for field in model._meta.fields:
|
||||
for field in model._meta.local_fields:
|
||||
if field in values:
|
||||
continue
|
||||
m = field.model._meta.concrete_model
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue