Skip to content

Commit 65b3c1d

Browse files
authored
Update main.py
returning the sqlalchemy Uuid type
1 parent 367b317 commit 65b3c1d

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

sqlmodel/main.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@
5151
from sqlalchemy.orm.decl_api import DeclarativeMeta
5252
from sqlalchemy.orm.instrumentation import is_instrumented
5353
from sqlalchemy.sql.schema import MetaData
54-
from sqlalchemy.sql.sqltypes import JSON, LargeBinary, Time
54+
from sqlalchemy.sql.sqltypes import JSON, LargeBinary, Time, Uuid
5555
from typing_extensions import Literal, deprecated, get_origin
5656

5757
from ._compat import ( # type: ignore[attr-defined]
@@ -693,7 +693,7 @@ def get_sqlalchemy_type(field: Any) -> Any:
693693
scale=getattr(metadata, "decimal_places", None),
694694
)
695695
if issubclass(type_, uuid.UUID):
696-
return GUID
696+
return Uuid
697697
if issubclass(type_, JSON):
698698
return JSON
699699

0 commit comments

Comments
 (0)