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

Method to_db_value

tortoise/fields/data.py:833–834  ·  view source on GitHub ↗
(self, value: Any, instance: type[Model] | Model)

Source from the content-addressed store, hash-verified

831 super().__init__(**kwargs)
832
833 def to_db_value(self, value: Any, instance: type[Model] | Model) -> str | None:
834 return value and str(value)
835
836 def to_python_value(self, value: Any) -> UUID | None:
837 if value is None or isinstance(value, UUID):

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected