feat(backend): when the convert array element contains an object, waring information occurs, and the object needs to be added to the array element as well

This commit is contained in:
zhuangjie.1125
2025-07-23 15:50:52 +08:00
parent 59729f01b2
commit 3b546369d8
2 changed files with 6 additions and 0 deletions

View File

@@ -391,6 +391,9 @@ func convertToArray(ctx context.Context, in any, path string, t *vo.TypeInfo, op
if err != nil {
return nil, nil, err
} else if ws != nil {
if elemType.Type == vo.DataTypeObject { // If the array type and the element is an object, the converted object will also need to be added to the array when waring occurs
out = append(out, newV)
}
warnings = append(warnings, *ws...)
} else { // only correctly converted elements go into the final array
out = append(out, newV)