Skip to content

Commit 74724b7

Browse files
committed
remove duplicate issue id
1 parent 60ca3d0 commit 74724b7

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

models/issues/issue_search.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -480,7 +480,7 @@ func IssueIDs(ctx context.Context, opts *IssuesOptions, otherConds ...builder.Co
480480
applySorts(sess, opts.SortType, opts.PriorityRepoID)
481481

482482
var res []int64
483-
total, err := sess.Select("`issue`.id").Table(&Issue{}).FindAndCount(&res)
483+
total, err := sess.Select("`issue`.id").Table(&Issue{}).Distinct("`issue`.id").FindAndCount(&res)
484484
if err != nil {
485485
return nil, 0, err
486486
}

0 commit comments

Comments
 (0)