Skip to content

Commit

Permalink
fix(torii-grpc): nullable enum array deser (#2887)
Browse files Browse the repository at this point in the history
* fix(torii-grpc): nullable enum array deser

* remove print
  • Loading branch information
Larkooo authored Jan 10, 2025
1 parent 4371331 commit 80ac6d1
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions crates/torii/sqlite/src/model.rs
Original file line number Diff line number Diff line change
Expand Up @@ -376,6 +376,10 @@ pub fn map_row_to_ty(
Ty::Array(ty) => {
let schema = ty[0].clone();
let serialized_array = row.try_get::<String, &str>(column_name)?;
if serialized_array.is_empty() {
*ty = vec![];
return Ok(());
}

let values: Vec<JsonValue> =
serde_json::from_str(&serialized_array).map_err(ParseError::FromJsonStr)?;
Expand Down

0 comments on commit 80ac6d1

Please sign in to comment.