Skip to content

Commit

Permalink
Update docs
Browse files Browse the repository at this point in the history
  • Loading branch information
henadzit committed Oct 23, 2024
1 parent bfa700e commit 542670f
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions tortoise/fields/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -266,6 +266,7 @@ def to_python_value(self, value: Any, validate=True) -> Any:
Converts from the DB type to the Python type.
:param value: Value from DB
:param validate: Should validation be performed
"""
if value is not None and not isinstance(value, self.field_type):
value = self.field_type(value) # pylint: disable=E1102
Expand Down

0 comments on commit 542670f

Please sign in to comment.