Skip to content

Commit

Permalink
Fix meta_with_chunks
Browse files Browse the repository at this point in the history
  • Loading branch information
loewenheim committed May 17, 2024
1 parent 267a20f commit c0cf884
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions relay-pyo3/src/processing.rs
Original file line number Diff line number Diff line change
Expand Up @@ -622,14 +622,12 @@ pub fn meta_with_chunks<'py>(
let current_item = data
.get_item(key)?
.expect("Current item should have existed");
let as_dict = current_item.downcast::<PyDict>()?;
result.insert(key.to_string(), meta_with_chunks(as_dict, &item)?);
result.insert(key.to_string(), meta_with_chunks(&current_item, &item)?);
} else if let Ok(data) = data.downcast::<PyList>() {
let int_key = key.to_str()?.parse::<usize>()?;
match data.get_item(int_key) {
Ok(val) => {
let val = val.downcast::<PyDict>()?;
result.insert(key.to_string(), meta_with_chunks(val, &item)?);
result.insert(key.to_string(), meta_with_chunks(&val, &item)?);
}
Err(_) => {
result.insert(
Expand Down

0 comments on commit c0cf884

Please sign in to comment.