Skip to content

Commit c55eeef

Browse files
committed
simplify searchOpt
1 parent 51591a8 commit c55eeef

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

modules/indexer/issues/dboptions.go

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,14 +13,11 @@ func ToSearchOptions(keyword string, opts *issues_model.IssuesOptions) *SearchOp
1313
Keyword: keyword,
1414
RepoIDs: opts.RepoIDs,
1515
AllPublic: false,
16+
ProjectID: &opts.ProjectID,
1617
IsPull: opts.IsPull,
1718
IsClosed: opts.IsClosed,
1819
}
1920

20-
if opts.ProjectID != 0 {
21-
searchOpt.ProjectID = &opts.ProjectID
22-
}
23-
2421
if len(opts.LabelIDs) == 1 && opts.LabelIDs[0] == 0 {
2522
searchOpt.NoLabelOnly = true
2623
} else {

0 commit comments

Comments
 (0)