Skip to content

Commit

Permalink
fix bug
Browse files Browse the repository at this point in the history
  • Loading branch information
wangyelei committed Jan 23, 2025
1 parent 9a980fa commit e0d8d59
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions pkg/dataprotection/backup/scheduler.go
Original file line number Diff line number Diff line change
Expand Up @@ -516,9 +516,7 @@ func (s *Scheduler) reconfigure(schedulePolicy *dpv1alpha1.SchedulePolicy) error
lastAppliedConfigsMap[schedulePolicy.BackupMethod] = updateParameterPairs
updateParameterPairsBytes, _ = json.Marshal(lastAppliedConfigsMap)
s.BackupSchedule.Annotations[dptypes.LastAppliedConfigsAnnotationKey] = string(updateParameterPairsBytes)
if _, ok := s.BackupSchedule.Annotations[constant.LastAppliedConfigAnnotationKey]; ok {
delete(s.BackupSchedule.Annotations, constant.LastAppliedConfigAnnotationKey)
}
delete(s.BackupSchedule.Annotations, constant.LastAppliedConfigAnnotationKey)
if err := s.Client.Patch(s.Ctx, s.BackupSchedule, patch); err != nil {
return err
}
Expand Down

0 comments on commit e0d8d59

Please sign in to comment.