From 369892634d308f510c9b7293f07321aaf0230eca Mon Sep 17 00:00:00 2001 From: carribean Date: Tue, 2 Dec 2025 14:37:23 +0800 Subject: [PATCH] [Bugfix] Fixed an issue with UUID type queries in MySQL databases (#28941) --- api/models/types.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/api/models/types.py b/api/models/types.py index 75dc495fed..f8369dab9e 100644 --- a/api/models/types.py +++ b/api/models/types.py @@ -19,7 +19,7 @@ class StringUUID(TypeDecorator[uuid.UUID | str | None]): def process_bind_param(self, value: uuid.UUID | str | None, dialect: Dialect) -> str | None: if value is None: return value - elif dialect.name == "postgresql": + elif dialect.name in ["postgresql", "mysql"]: return str(value) else: if isinstance(value, uuid.UUID):