Kaynağa Gözat

Merge branch 'debug' of http://8.136.199.33:3000/eta_server/eta_api into debug

gmy 2 ay önce
ebeveyn
işleme
54893b5fba

+ 1 - 1
controllers/english_report/report.go

@@ -142,7 +142,7 @@ func (this *EnglishReportController) Add() {
 		go models.ModifyEnglishReportCode(newReportId, reportCode)
 	}
 
-	excelReferences := make([]*excel.ReferencedExcelConfig, len(req.ExcelReferences))
+	excelReferences := make([]*excel.ReferencedExcelConfig, 0)
 	for _, r := range req.ExcelReferences {
 		refItem := excel.ReferencedExcelConfig{
 			UniqueCode:   r.UniqueCode,

+ 1 - 1
controllers/ppt_english.go

@@ -192,7 +192,7 @@ func (this *PptEnglishController) AddPpt() {
 		}
 		msg = "新增成功"
 
-		excelReferences := make([]*excel.ReferencedExcelConfig, len(req.ExcelReferences))
+		excelReferences := make([]*excel.ReferencedExcelConfig, 0)
 		for _, r := range req.ExcelReferences {
 			refItem := excel.ReferencedExcelConfig{
 				UniqueCode:   r.UniqueCode,

+ 1 - 1
controllers/ppt_v2.go

@@ -195,7 +195,7 @@ func (this *PptV2Controller) AddPpt() {
 		}
 		msg = "新增成功"
 
-		excelReferences := make([]*excel.ReferencedExcelConfig, len(req.ExcelReferences))
+		excelReferences := make([]*excel.ReferencedExcelConfig, 0)
 		for _, r := range req.ExcelReferences {
 			refItem := excel.ReferencedExcelConfig{
 				UniqueCode:   r.UniqueCode,