Skip to content

Commit

Permalink
Remove unnecessary code from to_db_value
Browse files Browse the repository at this point in the history
  • Loading branch information
henadzit committed Jan 4, 2025
1 parent 7afc90e commit 6f37ee9
Showing 1 changed file with 0 additions and 5 deletions.
5 changes: 0 additions & 5 deletions tortoise/fields/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -259,11 +259,6 @@ def to_db_value(self, value: Any, instance: "Union[Type[Model], Model]") -> Any:
if value is not None and not isinstance(value, self.field_type):
value = self.field_type(value) # pylint: disable=E1102

if self.__class__ in self.model._meta.db.executor_class.TO_DB_OVERRIDE:
value = self.model._meta.db.executor_class.TO_DB_OVERRIDE[self.__class__](
self, value, instance
)

self.validate(value)
return value

Expand Down

0 comments on commit 6f37ee9

Please sign in to comment.