xiziwen 3 meses atrás
pai
commit
0c5deb782c
2 arquivos alterados com 2 adições e 2 exclusões
  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

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