Fix crash on no service accounts (#44389)
* Fix crash on no service accounts * Fix tests * Update org_users.go * Update org_users.go * linter, again * Update build.go * Update pkg/services/serviceaccounts/tests/common.go * fix: big D Co-authored-by: Eric Leijonmarck <eric.leijonmarck@gmail.com>
This commit is contained in:
co-authored by
Eric Leijonmarck
parent
74ee5262e8
commit
525d9d97a8
@@ -135,7 +135,7 @@ func (api *ServiceAccountsAPI) ListTokens(ctx *models.ReqContext) response.Respo
|
||||
}
|
||||
|
||||
func (api *ServiceAccountsAPI) ListServiceAccounts(ctx *models.ReqContext) response.Response {
|
||||
serviceAccounts, err := api.store.ListServiceAccounts(ctx.Req.Context(), ctx.OrgId)
|
||||
serviceAccounts, err := api.store.ListServiceAccounts(ctx.Req.Context(), ctx.OrgId, -1)
|
||||
if err != nil {
|
||||
return response.Error(http.StatusInternalServerError, "Failed to list service accounts", err)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user