|
@@ -510,9 +510,11 @@ func AddReportAndChapter(reportItem *Report, chapterItemList []*ReportChapter) (
|
|
|
if len(chapterItemList) > 0 {
|
|
|
for _, chapterItem := range chapterItemList {
|
|
|
chapterItem.ReportId = int(reportId)
|
|
|
- if _, tmpErr := to.Insert(chapterItem); tmpErr != nil {
|
|
|
+ cpId, tmpErr := to.Insert(chapterItem)
|
|
|
+ if tmpErr != nil {
|
|
|
return
|
|
|
}
|
|
|
+ chapterItem.ReportChapterId = int(cpId)
|
|
|
}
|
|
|
}
|
|
|
|