Browse Source

Merge branch 'ETA_2.4.0' into debug

xiziwen 3 months ago
parent
commit
f83ebb5dbc
2 changed files with 2 additions and 2 deletions
  1. 1 1
      controllers/english_report/report.go
  2. 1 1
      controllers/ppt_english.go

+ 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,