Skip to content

Commit

Permalink
fix bug
Browse files Browse the repository at this point in the history
  • Loading branch information
ms-henglu committed Jun 22, 2021
1 parent e551800 commit 153ba79
Showing 1 changed file with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -218,6 +218,9 @@ func policyProtectionStateRefreshFunc(ctx context.Context, client *dataprotectio
if err != nil {
return nil, "", fmt.Errorf("retrieving DataProtection BackupInstance (%q): %+v", id, err)
}
if res.Properties == nil || res.Properties.ProtectionStatus == nil {
return nil, "", fmt.Errorf("error reading DataProtection BackupInstance (%q) protection status: %+v", id, err)
}

return res, string(res.Properties.ProtectionStatus.Status), nil
}
Expand Down

0 comments on commit 153ba79

Please sign in to comment.