diff --git a/sqlmodel/sql/sqltypes.py b/sqlmodel/sql/sqltypes.py index b3fda87..a9f53ad 100644 --- a/sqlmodel/sql/sqltypes.py +++ b/sqlmodel/sql/sqltypes.py @@ -47,10 +47,10 @@ class GUID(TypeDecorator): # type: ignore return str(value) else: if not isinstance(value, uuid.UUID): - return f"{uuid.UUID(value).int:x}" + return uuid.UUID(value).hex else: # hexstring - return f"{value.int:x}" + return value.hex def process_result_value(self, value: Any, dialect: Dialect) -> Optional[uuid.UUID]: if value is None: