Skip to content

Commit 6e60d24

Browse files
committed
Fix bug
1 parent 665993e commit 6e60d24

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

models/issue.go

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1210,8 +1210,7 @@ func (opts *IssuesOptions) setupSession(sess *xorm.Session) {
12101210
}
12111211

12121212
if opts.IsArchived != util.OptionalBoolNone {
1213-
sess.Join("INNER", "repository", "`issue`.repo_id = `repository`.id").
1214-
And(builder.Eq{"repository.is_archived": opts.IsArchived.IsTrue()})
1213+
sess.And(builder.Eq{"repository.is_archived": opts.IsArchived.IsTrue()})
12151214
}
12161215

12171216
if opts.LabelIDs != nil {
@@ -1293,6 +1292,8 @@ func GetRepoIDsForIssuesOptions(opts *IssuesOptions, user *User) ([]int64, error
12931292
sess := x.NewSession()
12941293
defer sess.Close()
12951294

1295+
sess.Join("INNER", "repository", "`issue`.repo_id = `repository`.id")
1296+
12961297
opts.setupSession(sess)
12971298

12981299
accessCond := accessibleRepositoryCondition(user)

0 commit comments

Comments
 (0)