Skip to content

Commit d0550bd

Browse files
committed
批量新增或批量单独设置修改:解决 Table:[] 值为空数组时也抛异常导致请求失败
1 parent 101b17d commit d0550bd

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

APIJSONORM/src/main/java/apijson/orm/AbstractObjectParser.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -713,7 +713,7 @@ public void onTableArrayParse(String key, JSONArray valueArray) throws Exception
713713
}
714714

715715
int failedCount = failedIds == null ? 0 : failedIds.size();
716-
if (failedCount >= allCount) {
716+
if (failedCount > 0 && failedCount >= allCount) {
717717
throw new ServerException("批量新增/修改 " + key + ":[] 中 " + allCount + " 个子项全部失败!"
718718
+ "第 " + firstFailIndex + " 项失败原因:" + (firstFailThrow == null ? "" : firstFailThrow.getMessage()));
719719
}

0 commit comments

Comments
 (0)