Skip to content

Commit

Permalink
optimize
Browse files Browse the repository at this point in the history
Signed-off-by: bobz965 <[email protected]>
  • Loading branch information
zbb88888 committed Feb 21, 2024
1 parent 8c53e23 commit fdf3f42
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/controller/init.go
Original file line number Diff line number Diff line change
Expand Up @@ -886,7 +886,7 @@ func (c *Controller) syncFinalizers() error {
}

func (c *Controller) ReplaceFinalizer(cachedObj client.Object) ([]byte, error) {
if slices.Contains(cachedObj.GetFinalizers(), util.DepreciatedFinalizerName) {
if controllerutil.ContainsFinalizer(cachedObj, util.DepreciatedFinalizerName) {
newObj := cachedObj.DeepCopyObject().(client.Object)
controllerutil.RemoveFinalizer(newObj, util.DepreciatedFinalizerName)
controllerutil.AddFinalizer(newObj, util.KubeOVNControllerFinalizer)
Expand Down

0 comments on commit fdf3f42

Please sign in to comment.