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

Method to_python_value

tortoise/fields/data.py:544–547  ·  view source on GitHub ↗
(self, value: Any)

Source from the content-addressed store, hash-verified

542 super().__init__(**kwargs)
543
544 def to_python_value(self, value: Any) -> datetime.date | None:
545 if value is not None and not isinstance(value, datetime.date):
546 value = parse_datetime(value).date()
547 return value
548
549 def to_db_value(
550 self, value: DateFieldQueryValueType | None, instance: type[Model] | Model

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected