Skip to content

Commit

Permalink
fix: cleanup default properties when specDefaults=={}
Browse files Browse the repository at this point in the history
Signed-off-by: Dhiraj Bokde <[email protected]>
  • Loading branch information
dhirajsb committed Nov 8, 2024
1 parent 8fcfb7e commit 223a739
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion api/v1alpha1/modelregistry_webhook.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 223a739

Please sign in to comment.