Potential fix for pull request finding

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Signed-off-by: grootSH <112615049+Steven4Hooisma@users.noreply.github.com>
This commit is contained in:
grootSH
2026-07-23 16:23:18 +02:00
committed by Aurélien Sibiril
parent ad8006de9c
commit ca6d543eeb

View File

@@ -116,6 +116,7 @@ func (d *UpCloudDriver) ListAccounts(ctx context.Context) ([]AccountRecord, erro
records := make([]AccountRecord, 0, len(resp.Accounts.Account))
for _, a := range resp.Accounts.Account {
username := strings.TrimSpace(a.Username)
if username == "" {
return nil, fmt.Errorf("upcloud returned an account with an empty username")