(ref_cls, dbref)
| 1179 | |
| 1180 | @staticmethod |
| 1181 | def _lazy_load_ref(ref_cls, dbref): |
| 1182 | dereferenced_son = ref_cls._get_db().dereference(dbref) |
| 1183 | if dereferenced_son is None: |
| 1184 | raise DoesNotExist(f"Trying to dereference unknown document {dbref}") |
| 1185 | |
| 1186 | return ref_cls._from_son(dereferenced_son) |
| 1187 | |
| 1188 | def __get__(self, instance, owner): |
| 1189 | """Descriptor to allow lazy dereferencing.""" |
no test coverage detected