Skip to content

Commit 340079d

Browse files
committed
Fix bug
1 parent 6e60d24 commit 340079d

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

models/issue.go

+4
Original file line numberDiff line numberDiff line change
@@ -1266,6 +1266,8 @@ func CountIssuesByRepo(opts *IssuesOptions) (map[int64]int64, error) {
12661266
sess := x.NewSession()
12671267
defer sess.Close()
12681268

1269+
sess.Join("INNER", "repository", "`issue`.repo_id = `repository`.id")
1270+
12691271
opts.setupSession(sess)
12701272

12711273
countsSlice := make([]*struct {
@@ -1312,6 +1314,7 @@ func Issues(opts *IssuesOptions) ([]*Issue, error) {
13121314
sess := x.NewSession()
13131315
defer sess.Close()
13141316

1317+
sess.Join("INNER", "repository", "`issue`.repo_id = `repository`.id")
13151318
opts.setupSession(sess)
13161319
sortIssuesSession(sess, opts.SortType, opts.PriorityRepoID)
13171320

@@ -1339,6 +1342,7 @@ func CountIssues(opts *IssuesOptions) (int64, error) {
13391342
}, 0, 1)
13401343

13411344
sess.Select("COUNT(issue.id) AS count").Table("issue")
1345+
sess.Join("INNER", "repository", "`issue`.repo_id = `repository`.id")
13421346
opts.setupSession(sess)
13431347
if err := sess.Find(&countsSlice); err != nil {
13441348
return 0, fmt.Errorf("Find: %v", err)

0 commit comments

Comments
 (0)