(self, instance, owner)
| 1494 | return ref_cls._from_son(dereferenced_son) |
| 1495 | |
| 1496 | def __get__(self, instance, owner): |
| 1497 | if instance is None: |
| 1498 | return self |
| 1499 | |
| 1500 | value = instance._data.get(self.name) |
| 1501 | |
| 1502 | auto_dereference = instance._fields[self.name]._auto_dereference |
| 1503 | if auto_dereference and isinstance(value, dict): |
| 1504 | doc_cls = get_document(value["_cls"]) |
| 1505 | instance._data[self.name] = self._lazy_load_ref(doc_cls, value["_ref"]) |
| 1506 | |
| 1507 | return super().__get__(instance, owner) |
| 1508 | |
| 1509 | def validate(self, value): |
| 1510 | if not isinstance(value, (Document, DBRef, dict, SON)): |
nothing calls this directly
no test coverage detected