Skip to content

Commit fb7e750

Browse files
committed
Fixed minimal array size
Signed-off-by: chandr-andr (Kiselev Aleksandr) <[email protected]>
1 parent bc63fd1 commit fb7e750

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/value_converter.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -264,10 +264,10 @@ impl ToSql for PythonDTO {
264264
for inner in py_iterable {
265265
items.push(inner);
266266
}
267-
if items.len() > 1 {
268-
items.to_sql(&items[0].array_type()?, out)?;
269-
} else {
267+
if items.is_empty() {
270268
return_is_null_true = true;
269+
} else {
270+
items.to_sql(&items[0].array_type()?, out)?;
271271
}
272272
}
273273
PythonDTO::PyJsonb(py_dict) | PythonDTO::PyJson(py_dict) => {

0 commit comments

Comments
 (0)