Skip to content

Commit 43d0bd0

Browse files
Merge pull request #7876 from rvanderp3/OCPBUGS-25841
OCPBUGS-25841: preserve category name when trying to find tag category
2 parents 0c43812 + f6ba7fe commit 43d0bd0

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

pkg/destroy/vsphere/client.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -250,8 +250,8 @@ func (c *Client) DeleteTag(ctx context.Context, id string) error {
250250
return err
251251
}
252252

253-
// DeleteTagCategory deletes a Tag Category named `id`.
254-
func (c *Client) DeleteTagCategory(ctx context.Context, id string) error {
253+
// DeleteTagCategory deletes a Tag Category named `categoryName`.
254+
func (c *Client) DeleteTagCategory(ctx context.Context, categoryName string) error {
255255
ctx, cancel := context.WithTimeout(ctx, defaultTimeout)
256256
defer cancel()
257257

@@ -270,7 +270,7 @@ func (c *Client) DeleteTagCategory(ctx context.Context, id string) error {
270270
}
271271
continue
272272
}
273-
if category.Name == id {
273+
if category.Name == categoryName {
274274
if err = tagManager.DeleteCategory(ctx, category); err != nil {
275275
return err
276276
}

0 commit comments

Comments
 (0)