marion 5 سال پیش
والد
کامیت
9649f853be
1فایلهای تغییر یافته به همراه3 افزوده شده و 0 حذف شده
  1. 3 0
      utils/db_utils.go

+ 3 - 0
utils/db_utils.go

@@ -90,6 +90,9 @@ func TransInsertWithTableNameAndSize(trans *xorm.Session, tableName string, size
 				if v.Kind() == reflect.Ptr {
 					v = v.Elem()
 				}
+				if v.IsZero() {
+					continue
+				}
 				elemValue := v.Interface()
 				if nil == arrMap[idx] {
 					arrMap[idx] = []interface{}{elemValue}