Skip to content

Commit

Permalink
fix: adds the python_type property. (#95)
Browse files Browse the repository at this point in the history
  • Loading branch information
cofin committed Nov 8, 2023
1 parent 7a91a8b commit a255c03
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions advanced_alchemy/types.py
Original file line number Diff line number Diff line change
Expand Up @@ -151,6 +151,10 @@ class DateTimeUTC(TypeDecorator):
impl = DateTime(timezone=True)
cache_ok = True

@property
def python_type(self) -> type[datetime.datetime]:
return datetime.datetime

def process_bind_param(self, value: datetime.datetime | None, dialect: Dialect) -> datetime.datetime | None:
if value is None:
return value
Expand Down

0 comments on commit a255c03

Please sign in to comment.