Skip to content

Commit 0885423

Browse files
authored
Merge pull request #2095 from afumagalli98/fix/cluster-veritas-license-1
fix: skip empty ID entries in removeDuplicates function
2 parents 033bf50 + 0c05bd0 commit 0885423

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

api-service/service/host_cluster_veritas.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,10 @@ func removeDuplicates(licenses []dto.ClusterVeritasLicense) []dto.ClusterVeritas
6868
unique := []dto.ClusterVeritasLicense{}
6969

7070
for _, license := range licenses {
71+
if license.ID == "" {
72+
continue
73+
}
74+
7175
key := license.LicenseTypeID + "|" + license.Description + "|" + license.Metric + "|" + license.ID
7276
if !check[key] {
7377
check[key] = true

0 commit comments

Comments
 (0)