MCPcopy
hub / github.com/tortoise/tortoise-orm / _rfk_getter

Function _rfk_getter

tortoise/models.py:117–124  ·  view source on GitHub ↗
(
    self: Model, _key: str, ftype: type[Model], frelfield: str, from_field: str
)

Source from the content-addressed store, hash-verified

115
116
117def _rfk_getter(
118 self: Model, _key: str, ftype: type[Model], frelfield: str, from_field: str
119) -> ReverseRelation:
120 val = getattr(self, _key, None)
121 if val is None:
122 val = ReverseRelation(ftype, frelfield, self, from_field)
123 setattr(self, _key, val)
124 return val
125
126
127def _ro2o_getter(

Callers

nothing calls this directly

Calls 1

ReverseRelationClass · 0.90

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…