This website works better with JavaScript.
Home
Issues
Pull Requests
Milestones
AI流水线
Repositories
Datasets
Forum
实训
竞赛
大数据
Register
Sign In
wangwei
/
aiforge
Not watched
Unwatch
Watch all
Watch but not notify
1
Star
0
Fork
0
Code
Releases
128
Wiki
Activity
Issues
0
Pull Requests
0
Datasets
Model
Cloudbrain
Browse Source
Prevent xorm nil insert in Review.Comments (
#11150
)
tags/v1.13.0-dev
6543
GitHub
5 years ago
parent
88ada29ea8
commit
4db6d2aa3e
1 changed files
with
4 additions
and
2 deletions
Unified View
Diff Options
Show Stats
Download Patch File
Download Diff File
+4
-2
models/review.go
+ 4
- 2
models/review.go
View File
@@ -457,8 +457,10 @@ func InsertReviews(reviews []*Review) error {
c.ReviewID = review.ID
c.ReviewID = review.ID
}
}
if _, err := sess.NoAutoTime().Insert(review.Comments); err != nil {
return err
if len(review.Comments) > 0 {
if _, err := sess.NoAutoTime().Insert(review.Comments); err != nil {
return err
}
}
}
}
}
Write
Preview
Loading…
Cancel
Save