Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
felipensp committed Nov 10, 2024
1 parent fdc49dc commit b2a9bb1
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion vlib/v/gen/c/orm.v
Original file line number Diff line number Diff line change
Expand Up @@ -319,7 +319,9 @@ fn (mut g Gen) write_orm_insert_with_last_ids(node ast.SqlStmtLine, connection_v
if field.typ.has_flag(.option) {
opt_fields << arrs.len
}
arrs << unsafe { node.sub_structs[int(field.typ)] }
if node.sub_structs.len > 0 {
arrs << unsafe { node.sub_structs[int(field.typ)] }
}
field_names << field.name
}
}
Expand Down

0 comments on commit b2a9bb1

Please sign in to comment.