Skip to content

Commit

Permalink
update variable name
Browse files Browse the repository at this point in the history
Signed-off-by: Carlos Panato <ctadeu@gmail.com>
  • Loading branch information
cpanato committed Jan 31, 2020
1 parent 4a5a63f commit 42b6126
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pkg/cmd/cli/restore/create.go
Original file line number Diff line number Diff line change
Expand Up @@ -171,11 +171,11 @@ func (o *CreateOptions) Validate(c *cobra.Command, args []string, f client.Facto
return err
}
case o.ScheduleName != "":
scheduleItems, err := o.client.VeleroV1().Backups(f.Namespace()).List(metav1.ListOptions{LabelSelector: fmt.Sprintf("%s=%s", api.ScheduleNameLabel, o.ScheduleName)})
backupItems, err := o.client.VeleroV1().Backups(f.Namespace()).List(metav1.ListOptions{LabelSelector: fmt.Sprintf("%s=%s", api.ScheduleNameLabel, o.ScheduleName)})
if err != nil {
return err
}
if len(scheduleItems.Items) == 0 {
if len(backupItems.Items) == 0 {
return errors.Errorf("No backups found for the schedule %s", o.ScheduleName)
}
}
Expand Down

0 comments on commit 42b6126

Please sign in to comment.