From a1f3439183d5df280441f45d61b432dd1046174e Mon Sep 17 00:00:00 2001 From: Miles Yucht Date: Thu, 19 Dec 2024 17:35:05 +0100 Subject: [PATCH] fix --- .../products/registered_model/data_registered_model.go | 2 +- .../registered_model/data_registered_model_versions.go | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/internal/providers/pluginfw/products/registered_model/data_registered_model.go b/internal/providers/pluginfw/products/registered_model/data_registered_model.go index 912f5b606..284d4df9f 100644 --- a/internal/providers/pluginfw/products/registered_model/data_registered_model.go +++ b/internal/providers/pluginfw/products/registered_model/data_registered_model.go @@ -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{}), } } diff --git a/internal/providers/pluginfw/products/registered_model/data_registered_model_versions.go b/internal/providers/pluginfw/products/registered_model/data_registered_model_versions.go index 6cf39179c..95e863cd0 100644 --- a/internal/providers/pluginfw/products/registered_model/data_registered_model_versions.go +++ b/internal/providers/pluginfw/products/registered_model/data_registered_model_versions.go @@ -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)...) }