Skip to content

Commit

Permalink
fix: Check if the deletion time is nil or zero (#567)
Browse files Browse the repository at this point in the history
Signed-off-by: Ce Gao <gaoce@caicloud.io>
  • Loading branch information
gaocegege authored and k8s-ci-robot committed May 21, 2019
1 parent 07b1343 commit 87e3a53
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/api/operators/apis/experiment/v1alpha2/util.go
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ func (exp *Experiment) MarkExperimentStatusFailed(reason, message string) {
}

func (exp *Experiment) NeedUpdateFinalizers() (bool, []string) {
deleted := exp.GetDeletionTimestamp() != nil
deleted := exp.ObjectMeta.DeletionTimestamp.IsZero()
pendingFinalizers := exp.GetFinalizers()
contained := false
for _, elem := range pendingFinalizers {
Expand Down

0 comments on commit 87e3a53

Please sign in to comment.