Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
victorteokw committed Feb 1, 2024
1 parent db5090c commit 82f3db9
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/object/value/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -114,8 +114,7 @@ pub fn py_any_to_teo_value(py: Python<'_>, object: &PyAny) -> PyResult<Value> {
let mut map: IndexMap<String, Value> = IndexMap::new();
for k in dict.keys() {
let k_str: &str = k.extract()?;
let fixed_key = if k_str.ends_with("_") { k_str.strip_suffix("_").unwrap().to_owned() } else { k_str.to_owned() };
map.insert(fixed_key, py_any_to_teo_value(py, dict.get_item(k)?.unwrap())?);
map.insert(k_str.to_owned(), py_any_to_teo_value(py, dict.get_item(k)?.unwrap())?);
}
Ok(Value::Dictionary(map))
} else if object.is_instance_of::<Range>() {
Expand Down

0 comments on commit 82f3db9

Please sign in to comment.