File tree Expand file tree Collapse file tree 2 files changed +3
-4
lines changed Expand file tree Collapse file tree 2 files changed +3
-4
lines changed Original file line number Diff line number Diff line change @@ -239,10 +239,10 @@ func (u *User) GetEmail() string {
239239 return u .Email
240240}
241241
242- // GetAllUsers returns a slice of all users found in DB.
242+ // GetAllUsers returns a slice of all individual users found in DB.
243243func GetAllUsers () ([]* User , error ) {
244244 users := make ([]* User , 0 )
245- return users , x .OrderBy ("id" ).Find (& users )
245+ return users , x .OrderBy ("id" ).Where ( "type = ?" , UserTypeIndividual ). Find (& users )
246246}
247247
248248// IsLocal returns true if user login type is LoginPlain.
Original file line number Diff line number Diff line change @@ -141,7 +141,6 @@ func SearchIssues(ctx *context.APIContext) {
141141 keyword = ""
142142 }
143143 var issueIDs []int64
144- var labelIDs []int64
145144 if len (keyword ) > 0 && len (repoIDs ) > 0 {
146145 if issueIDs , err = issue_indexer .SearchIssuesByKeyword (repoIDs , keyword ); err != nil {
147146 ctx .Error (http .StatusInternalServerError , "SearchIssuesByKeyword" , err )
@@ -176,7 +175,7 @@ func SearchIssues(ctx *context.APIContext) {
176175
177176 // Only fetch the issues if we either don't have a keyword or the search returned issues
178177 // This would otherwise return all issues if no issues were found by the search.
179- if len (keyword ) == 0 || len (issueIDs ) > 0 || len (labelIDs ) > 0 {
178+ if len (keyword ) == 0 || len (issueIDs ) > 0 || len (includedLabelNames ) > 0 {
180179 issuesOpt := & models.IssuesOptions {
181180 ListOptions : models.ListOptions {
182181 Page : ctx .QueryInt ("page" ),
You can’t perform that action at this time.
0 commit comments