Skip to content

Commit

Permalink
fix inconsistency with basetype.string
Browse files Browse the repository at this point in the history
  • Loading branch information
hanxiaop committed Jan 6, 2025
1 parent a9039e6 commit b39cc07
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions akp/types/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ import (
"context"
"fmt"
"strconv"
"strings"

"github.com/hashicorp/terraform-plugin-framework/attr"
"github.com/hashicorp/terraform-plugin-framework/diag"
Expand Down Expand Up @@ -575,8 +574,8 @@ func toExtensionsAPIModel(entries basetypes.ListValue) []*v1alpha1.ArgoCDExtensi
var extensions []*v1alpha1.ArgoCDExtensionInstallEntry
for _, entry := range entries.Elements() {
obj := entry.(basetypes.ObjectValue)
id := strings.Trim(obj.Attributes()["id"].String(), `"`)
version := strings.Trim(obj.Attributes()["version"].String(), `"`)
id := obj.Attributes()["id"].(basetypes.StringValue).ValueString()
version := obj.Attributes()["version"].(basetypes.StringValue).ValueString()
extensions = append(extensions, &v1alpha1.ArgoCDExtensionInstallEntry{
Id: id,
Version: version,
Expand Down

0 comments on commit b39cc07

Please sign in to comment.