Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
mgyucht committed Dec 19, 2024
1 parent 6290691 commit a1f3439
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ type RegisteredModelData struct {

func (RegisteredModelData) GetComplexFieldTypes(context.Context) map[string]reflect.Type {
return map[string]reflect.Type{
"model_info": reflect.TypeOf(catalog_tf.RegisteredModelInfo{}),
"model_info": reflect.TypeOf(catalog_tf.RegisteredModelInfo_SdkV2{}),
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -76,13 +76,13 @@ func (d *RegisteredModelVersionsDataSource) Read(ctx context.Context, req dataso
}
var tfModelVersions []attr.Value
for _, modelVersionSdk := range modelVersions.ModelVersions {
var modelVersion catalog_tf.ModelVersionInfo
var modelVersion catalog_tf.ModelVersionInfo_SdkV2
resp.Diagnostics.Append(converters.GoSdkToTfSdkStruct(ctx, modelVersionSdk, &modelVersion)...)
if resp.Diagnostics.HasError() {
return
}
tfModelVersions = append(tfModelVersions, modelVersion.ToObjectValue(ctx))
}
registeredModelVersions.ModelVersions = types.ListValueMust(catalog_tf.ModelVersionInfo{}.Type(ctx), tfModelVersions)
registeredModelVersions.ModelVersions = types.ListValueMust(catalog_tf.ModelVersionInfo_SdkV2{}.Type(ctx), tfModelVersions)
resp.Diagnostics.Append(resp.State.Set(ctx, registeredModelVersions)...)
}

0 comments on commit a1f3439

Please sign in to comment.