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 0e6b377 commit 8d7f211Copy full SHA for 8d7f211
src/serializers/type_serializers/uuid.rs
@@ -2,6 +2,7 @@ use std::borrow::Cow;
2
3
use pyo3::prelude::*;
4
use pyo3::types::PyDict;
5
+use uuid::Uuid;
6
7
use crate::definitions::DefinitionsBuilder;
8
@@ -11,7 +12,9 @@ use super::{
11
12
};
13
14
pub(crate) fn uuid_to_string(py_uuid: &Bound<'_, PyAny>) -> PyResult<String> {
- Ok(py_uuid.str()?.to_string())
15
+ let uuid_int_val: u128 = py_uuid.getattr("int")?.extract()?;
16
+ let uuid = Uuid::from_u128(uuid_int_val);
17
+ Ok(uuid.to_string())
18
}
19
20
#[derive(Debug, Clone)]
0 commit comments