aboutsummaryrefslogtreecommitdiffstats
path: root/models/issues/comment_code.go
diff options
context:
space:
mode:
Diffstat (limited to 'models/issues/comment_code.go')
-rw-r--r--models/issues/comment_code.go6
1 files changed, 4 insertions, 2 deletions
diff --git a/models/issues/comment_code.go b/models/issues/comment_code.go
index 67a77ceb13..b562aab500 100644
--- a/models/issues/comment_code.go
+++ b/models/issues/comment_code.go
@@ -86,8 +86,10 @@ func findCodeComments(ctx context.Context, opts FindCommentsOptions, issue *Issu
ids = append(ids, comment.ReviewID)
}
}
- if err := e.In("id", ids).Find(&reviews); err != nil {
- return nil, err
+ if len(ids) > 0 {
+ if err := e.In("id", ids).Find(&reviews); err != nil {
+ return nil, err
+ }
}
n := 0