MCPcopy Create free account
hub / github.com/tortoise/tortoise-orm / full_name

Method full_name

examples/fastapi/models.py:19–25  ·  view source on GitHub ↗

Returns the best name

(self)

Source from the content-addressed store, hash-verified

17 modified_at = fields.DatetimeField(auto_now=True)
18
19 def full_name(self) -> str:
20 """
21 Returns the best name
22 """
23 if self.name or self.family_name:
24 return f"{self.name or ''} {self.family_name or ''}".strip()
25 return self.username
26
27 class PydanticMeta:
28 computed = ["full_name"]

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected