diff --git a/models/user_business_analysis.go b/models/user_business_analysis.go index 19a24dbac..1223224ee 100644 --- a/models/user_business_analysis.go +++ b/models/user_business_analysis.go @@ -674,5 +674,8 @@ func subMonth(t1, t2 time.Time) (month int) { } monthInterval %= 12 month = yearInterval*12 + monthInterval + if month == 0 { + month = 1 + } return month }