File tree Expand file tree Collapse file tree 1 file changed +4
-8
lines changed Expand file tree Collapse file tree 1 file changed +4
-8
lines changed Original file line number Diff line number Diff line change @@ -1523,21 +1523,17 @@ func GetUserIssueStats(opts UserIssueStatsOptions) (*IssueStats, error) {
1523
1523
if len (opts .IssueIDs ) > 0 {
1524
1524
cond = cond .And (builder .In ("issue.id" , opts .IssueIDs ))
1525
1525
}
1526
- if opts .IsArchived != util .OptionalBoolNone {
1527
- relevantRepoIDs := []int64 {}
1528
- r := []* Repository {}
1529
- s := x .Table ("repository" ).Where (builder.Eq {"is_archived" : opts .IsArchived .IsTrue ()})
1530
- s .Select ("id" ).Find (& relevantRepoIDs )
1531
- s .Find (& r )
1532
- cond = cond .And (builder .In ("issue.repo_id" , relevantRepoIDs ))
1533
- }
1534
1526
1535
1527
sess := func (cond builder.Cond ) * xorm.Session {
1536
1528
s := x .Where (cond )
1537
1529
if len (opts .LabelIDs ) > 0 {
1538
1530
s .Join ("INNER" , "issue_label" , "issue_label.issue_id = issue.id" ).
1539
1531
In ("issue_label.label_id" , opts .LabelIDs )
1540
1532
}
1533
+ if opts .IsArchived != util .OptionalBoolNone {
1534
+ s .Join ("INNER" , "repository" , "issue.repo_id = repository.id" ).
1535
+ And (builder.Eq {"repository.is_archived" : opts .IsArchived .IsTrue ()})
1536
+ }
1541
1537
return s
1542
1538
}
1543
1539
You can’t perform that action at this time.
0 commit comments