Skip to content

Commit

Permalink
vrg: add a nil check
Browse files Browse the repository at this point in the history
Signed-off-by: Raghavendra Talur <[email protected]>
  • Loading branch information
raghavendra-talur committed Jan 21, 2025
1 parent acc70c7 commit 1fc8930
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions internal/controller/vrg_kubeobjects.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,12 +25,12 @@ import (

var ErrWorkflowNotFound = fmt.Errorf("backup or restore workflow not found")

func kubeObjectsCaptureInterval(kubeObjectProtectionSpec *ramen.KubeObjectProtectionSpec) time.Duration {
if kubeObjectProtectionSpec.CaptureInterval == nil {
func kubeObjectsCaptureInterval(spec *ramen.KubeObjectProtectionSpec) time.Duration {
if spec == nil || spec.CaptureInterval == nil {
return ramen.KubeObjectProtectionCaptureIntervalDefault
}

return kubeObjectProtectionSpec.CaptureInterval.Duration
return spec.CaptureInterval.Duration
}

func kubeObjectsCapturePathNamesAndNamePrefix(
Expand Down

0 comments on commit 1fc8930

Please sign in to comment.