Skip to content

Commit

Permalink
api: return early if no search results
Browse files Browse the repository at this point in the history
  • Loading branch information
invis-bitfly committed Apr 9, 2024
1 parent 9227873 commit 21e7f07
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions backend/pkg/api/data_access/data_access.go
Original file line number Diff line number Diff line change
Expand Up @@ -839,6 +839,11 @@ func (d *DataAccessService) GetValidatorDashboardValidators(dashboardId t.VDBId,
}
}

// no data found (searched for something that does not exist)
if len(data) == 0 {
return nil, &paging, nil
}

// Sort the result
isort.Slice(data, func(i, j int) bool {
switch sort.Column {
Expand Down

0 comments on commit 21e7f07

Please sign in to comment.