From 223a739096c5e505edb266bcaf78d7abfd7f9420 Mon Sep 17 00:00:00 2001 From: Dhiraj Bokde Date: Thu, 7 Nov 2024 16:19:11 -0800 Subject: [PATCH] fix: cleanup default properties when specDefaults=={} Signed-off-by: Dhiraj Bokde --- api/v1alpha1/modelregistry_webhook.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/api/v1alpha1/modelregistry_webhook.go b/api/v1alpha1/modelregistry_webhook.go index 10f729c..853513b 100644 --- a/api/v1alpha1/modelregistry_webhook.go +++ b/api/v1alpha1/modelregistry_webhook.go @@ -134,7 +134,7 @@ func (r *ModelRegistry) Default() { // and it removes default runtime values that match default runtime properties set in the operator // since they are redundant as custom property values. func (r *ModelRegistry) cleanupRuntimeDefaults() { - if len(r.Status.SpecDefaults) != 0 { + if r.Status.SpecDefaults != "" && r.Status.SpecDefaults != "{}" { // nothing to do as model registries with specDefaults set // will only have custom properties set by users return