Skip to content

Commit 14a3dc9

Browse files
author
Allen Cheng
committed
fix: use PyO3 downcast for add_many records
1 parent ddb0c82 commit 14a3dc9

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

python/src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -218,7 +218,7 @@ impl Context {
218218
let mut prepared = Vec::new();
219219
for (index, item) in records.try_iter()?.enumerate() {
220220
let item = item?;
221-
let dict = item.cast::<PyDict>().map_err(|_| {
221+
let dict = item.downcast::<PyDict>().map_err(|_| {
222222
PyTypeError::new_err(format!("records[{index}] must be a dict"))
223223
})?;
224224
prepared.push(self.prepare_record_from_dict(dict, index)?);

0 commit comments

Comments
 (0)