Skip to content

Commit

Permalink
return empty slice instead of nil
Browse files Browse the repository at this point in the history
Signed-off-by: Francesco Ilario <filario@redhat.com>
  • Loading branch information
filariow committed Jul 15, 2024
1 parent 91ff1aa commit 6c2a595
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pkg/proxy/handlers/spacelister_list.go
Original file line number Diff line number Diff line change
Expand Up @@ -42,13 +42,13 @@ func ListUserWorkspaces(ctx echo.Context, spaceLister *SpaceLister) ([]toolchain
}
// signup is not ready
if signup == nil {
return nil, nil
return []toolchainv1alpha1.Workspace{}, nil
}

// get MUR Names
murNames := getMURNamesForList(ctx, signup)
if len(murNames) == 0 {
return nil, nil
return []toolchainv1alpha1.Workspace{}, nil
}

// get all spacebindings with given mur since no workspace was provided
Expand Down

0 comments on commit 6c2a595

Please sign in to comment.