diff --git a/django/db/models/query_utils.py b/django/db/models/query_utils.py index 96409cc67c..4c6c48bf9d 100644 --- a/django/db/models/query_utils.py +++ b/django/db/models/query_utils.py @@ -141,7 +141,7 @@ class DeferredAttribute: return self data = instance.__dict__ field_name = self.field.attname - if data.get(field_name, self) is self: + if field_name not in data: # Let's see if the field is part of the parent chain. If so we # might be able to reuse the already loaded value. Refs #18343. val = self._check_parent_chain(instance)