Bug: Rollback change in search (#55443)

This commit is contained in:
idafurjes
2022-09-20 12:18:39 +02:00
committed by GitHub
parent cb93ed04a7
commit eff4daacaf
2 changed files with 6 additions and 5 deletions

View File

@@ -102,14 +102,14 @@ func (s *StandardSearchService) IsDisabled() bool {
}
func (s *StandardSearchService) Run(ctx context.Context) error {
orgQuery := &org.SearchOrgsQuery{}
result, err := s.orgService.Search(ctx, orgQuery)
orgQuery := &models.SearchOrgsQuery{}
err := s.sql.SearchOrgs(ctx, orgQuery)
if err != nil {
return fmt.Errorf("can't get org list: %w", err)
}
orgIDs := make([]int64, 0, len(result))
for _, org := range result {
orgIDs = append(orgIDs, org.ID)
orgIDs := make([]int64, 0, len(orgQuery.Result))
for _, org := range orgQuery.Result {
orgIDs = append(orgIDs, org.Id)
}
return s.dashboardIndex.run(ctx, orgIDs, s.reIndexCh)
}