From: Federico Caselli Date: Mon, 18 Mar 2024 21:01:00 +0000 (+0100) Subject: do not convert uuid to string in postgresql and mssql X-Git-Tag: rel_2_0_29~11^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b09effd44105550c4c3ea8f5e94941ee1024a972;p=thirdparty%2Fsqlalchemy%2Fsqlalchemy.git do not convert uuid to string in postgresql and mssql Change-Id: Ic3c87d8c654926f7ef28ba9ec6dd21c50a1171cf (cherry picked from commit 5032cf6bc14f76e47063696a58ea3cce44e0f13f) --- diff --git a/doc/build/core/custom_types.rst b/doc/build/core/custom_types.rst index 90fc503186..5390824dda 100644 --- a/doc/build/core/custom_types.rst +++ b/doc/build/core/custom_types.rst @@ -212,10 +212,8 @@ string, using a CHAR(36) type:: return dialect.type_descriptor(self._default_type) def process_bind_param(self, value, dialect): - if value is None: + if value is None or dialect.name in ("postgresql", "mssql"): return value - elif dialect.name in ("postgresql", "mssql"): - return str(value) else: if not isinstance(value, uuid.UUID): value = uuid.UUID(value)