Browse Source

Merge branch 'change_orm'

Roc 2 years ago
parent
commit
1d61e6c0ea
1 changed files with 4 additions and 0 deletions
  1. 4 0
      models/chart.go

+ 4 - 0
models/chart.go

@@ -140,6 +140,10 @@ func AddCalculateQuarterV5(dataList []*EdbDataList) (result *EdbDataResult, err
 			fmt.Println("errMsg:", errMsg)
 		}
 	}()
+	if len(dataList) <= 0 {
+		result.List = make([]*EdbDataItems, 0)
+		return
+	}
 
 	endDate := dataList[len(dataList)-1].DataTime
 	endDateForm, err := time.Parse(utils.FormatDate, endDate)