diff --git a/django/db/models/query_utils.py b/django/db/models/query_utils.py
index a56ab5c..41a62a4 100644
a
|
b
|
class DeferredAttribute(object):
|
108 | 108 | Deferred loading attributes can be set normally (which means there will |
109 | 109 | never be a database lookup involved. |
110 | 110 | """ |
| 111 | cls = self.model_ref() |
| 112 | for field in cls._meta.fields: |
| 113 | if field.attname == self.field_name: |
| 114 | if hasattr(field, '__set__'): |
| 115 | field.__set__(instance, value) |
| 116 | if hasattr(field, '__get__'): |
| 117 | value = field.__get__(instance, cls) |
| 118 | break |
111 | 119 | instance.__dict__[self.field_name] = value |
112 | 120 | |
113 | 121 | def select_related_descend(field, restricted, requested, reverse=False): |