We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent cd2521e commit cb696e2Copy full SHA for cb696e2
src/serializers/type_serializers/uuid.rs
@@ -14,7 +14,8 @@ use super::{
14
pub(crate) fn uuid_to_string(py_uuid: &Bound<'_, PyAny>) -> PyResult<String> {
15
let py = py_uuid.py();
16
let uuid_int_val: u128 = py_uuid.getattr(intern!(py, "int"))?.extract()?;
17
- let uuid = Uuid::from_u128(uuid_int_val);
+ // we use a little endian conversion for compatibility across platforms, see https://github.com/pydantic/pydantic-core/pull/1372
18
+ let uuid = Uuid::from_u128(uuid_int_val.to_le());
19
Ok(uuid.to_string())
20
}
21
0 commit comments