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

Method to_python_value

tortoise/contrib/mysql/fields.py:53–59  ·  view source on GitHub ↗
(self, value: Any)

Source from the content-addressed store, hash-verified

51 return value and str(value)
52
53 def to_python_value(self, value: Any) -> UUID | None:
54 if value is None or isinstance(value, UUID):
55 return value
56 elif self._binary_compression and isinstance(value, bytes):
57 return UUID(bytes=value)
58 else:
59 return UUID(value)

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected