diff --git a/.changes/unreleased/Bugfix-20240718-095431.yaml b/.changes/unreleased/Bugfix-20240718-095431.yaml new file mode 100644 index 00000000..ad679d7d --- /dev/null +++ b/.changes/unreleased/Bugfix-20240718-095431.yaml @@ -0,0 +1,3 @@ +kind: Bugfix +body: opslevel update service command correctly updates fields +time: 2024-07-18T09:54:31.699848-05:00 diff --git a/src/cmd/service.go b/src/cmd/service.go index 2ce90a96..bfe8519a 100644 --- a/src/cmd/service.go +++ b/src/cmd/service.go @@ -232,7 +232,10 @@ func convertServiceUpdateInput(input opslevel.ServiceUpdateInput) opslevel.Servi } func NullableString(value *string) *opslevel.Nullable[string] { - if value == nil || *value == "" { + if value == nil { + return nil + } + if *value == "" { return opslevel.NewNull() } return opslevel.NewNullableFrom(*value)