fixed binding uuid column to str with dashes
This commit is contained in:
@ -1,8 +1,7 @@
|
|||||||
# 0.5.4
|
# 0.6.0
|
||||||
|
|
||||||
* Fixed bug in `UUID` field that was trimmed to 32 chars instead of 36 (with dashes).
|
* **Breaking** Changed `UUID` field that was trimmed to 32 chars (without dashes) instead of 36 (with dashes)
|
||||||
* Since first 32 characters of uuid should still be unique I consider this as non-breaking, but if you
|
to more in line with other libraries.
|
||||||
were using UUID field before you might consider re-generating the ids.
|
|
||||||
|
|
||||||
# 0.5.3
|
# 0.5.3
|
||||||
|
|
||||||
|
|||||||
@ -30,7 +30,7 @@ class UndefinedType: # pragma no cover
|
|||||||
|
|
||||||
Undefined = UndefinedType()
|
Undefined = UndefinedType()
|
||||||
|
|
||||||
__version__ = "0.5.4"
|
__version__ = "0.6.0"
|
||||||
__all__ = [
|
__all__ = [
|
||||||
"Integer",
|
"Integer",
|
||||||
"BigInteger",
|
"BigInteger",
|
||||||
|
|||||||
@ -37,7 +37,7 @@ class UUID(TypeDecorator): # pragma nocover
|
|||||||
return value
|
return value
|
||||||
if not isinstance(value, uuid.UUID):
|
if not isinstance(value, uuid.UUID):
|
||||||
value = self._cast_to_uuid(value)
|
value = self._cast_to_uuid(value)
|
||||||
return "%.32x" % value.int
|
return str(value)
|
||||||
|
|
||||||
def process_result_value(
|
def process_result_value(
|
||||||
self, value: Optional[str], dialect: DefaultDialect
|
self, value: Optional[str], dialect: DefaultDialect
|
||||||
|
|||||||
Reference in New Issue
Block a user