Skip to content

Commit e69eae6

Browse files
committed
fix: duplicates for service accouts ids
1 parent 9aa4134 commit e69eae6

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

pkg/cmd/serviceaccount/list/list.go

+4-3
Original file line numberDiff line numberDiff line change
@@ -130,12 +130,13 @@ func mapResponseToNewFormat(res kafkamgmtclient.ServiceAccountList) []svcacctmgm
130130

131131
var serviceaccounts []svcacctmgmtclient.ServiceAccountData
132132

133-
for _, svcAcct := range res.GetItems() {
134-
133+
newServiceAccounts := res.GetItems()
134+
for _, svcAcct := range newServiceAccounts {
135135
timeInt := svcAcct.CreatedAt.Unix()
136+
saId := svcAcct.GetId()
136137

137138
formattedServiceAccount := svcacctmgmtclient.ServiceAccountData{
138-
Id: &svcAcct.Id,
139+
Id: &saId,
139140
ClientId: svcAcct.ClientId,
140141
Name: svcAcct.Name,
141142
Description: svcAcct.Description,

0 commit comments

Comments
 (0)