Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion macros/src/convert_output.rs
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ fn derive_convert_output_enum_containers(
) -> async_graphql::Result<Option<async_graphql::dynamic::FieldValue<'static>>> {
if let sea_orm::sea_query::value::Value::Json(opt_json) = value {
if let Some(json) = opt_json {
match serde_json::from_value::<#orig_ident>(json.clone()) {
match serde_json::from_value::<#orig_ident>((*json).clone()) {
Ok(obj) => match obj {
#(#variant_matches)*
},
Expand Down
2 changes: 1 addition & 1 deletion src/builder_context/types_map.rs
Original file line number Diff line number Diff line change
Expand Up @@ -660,7 +660,7 @@ pub fn converted_value_to_sea_orm_value(
})?,
Err(_) => value.deserialize()?,
};
sea_orm::Value::Json(Some(value))
sea_orm::Value::Json(Some(Box::new(value)))
}
#[cfg(feature = "with-chrono")]
ConvertedType::ChronoDate => {
Expand Down
2 changes: 1 addition & 1 deletion src/outputs/entity_object.rs
Original file line number Diff line number Diff line change
Expand Up @@ -282,7 +282,7 @@ pub(crate) fn sea_query_value_to_graphql_value(
#[cfg(feature = "with-json")]
#[cfg_attr(docsrs, doc(cfg(feature = "with-json")))]
sea_orm::sea_query::Value::Json(value) => {
value.map(|it| match Value::from_json(it.clone()) {
value.map(|it| match Value::from_json((*it).clone()) {
Ok(v) => v,
Err(_) => Value::from(it.to_string()),
})
Expand Down
Loading