Skip to content

Commit

Permalink
fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
sharmaansh21 authored and Anshul Sharma committed Dec 8, 2023
1 parent 4d8984b commit f75357b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pkg/kn/commands/service/configuration_edit_flags.go
Original file line number Diff line number Diff line change
Expand Up @@ -522,13 +522,13 @@ func (p *ConfigurationEditFlags) Apply(
labelsToRemove = append(labelsToRemove, value.Name)
}

if err := servinglib.UpdateRevisionTemplateAnnotations(template, map[string]string{}, annotationsToRemove); err != nil {
if err = servinglib.UpdateRevisionTemplateAnnotations(template, map[string]string{}, annotationsToRemove); err != nil {
return err
}
updatedLabels := servinglib.UpdateLabels(service.ObjectMeta.Labels, map[string]string{}, labelsToRemove)
service.ObjectMeta.Labels = updatedLabels // In case service.ObjectMeta.Labels was nil
} else {
if err := servinglib.UpdateRevisionTemplateAnnotations(template, profileAnnotations, []string{}); err != nil {
if err = servinglib.UpdateRevisionTemplateAnnotations(template, profileAnnotations, []string{}); err != nil {
return err
}
updatedLabels := servinglib.UpdateLabels(service.ObjectMeta.Labels, profileLabels, []string{})
Expand Down

0 comments on commit f75357b

Please sign in to comment.