Skip to content

Commit

Permalink
Merge branch 'master' into fix-1483
Browse files Browse the repository at this point in the history
  • Loading branch information
NissesSenap committed Apr 29, 2024
2 parents d2e1403 + e0d3ad8 commit c609650
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions controllers/dashboard_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -305,10 +305,14 @@ func (r *GrafanaDashboardReconciler) onDashboardDeleted(ctx context.Context, nam
resp, err := grafanaClient.Dashboards.GetDashboardByUID(*uid)
if err != nil {
var notFound *dashboards.GetDashboardByUIDNotFound
if !errors.As(err, &notFound) {
return err
if errors.As(err, &notFound) {
// nothing to do if the dashboard doesn't exist
return nil
}

return err
}

dash := resp.GetPayload()

_, err = grafanaClient.Dashboards.DeleteDashboardByUID(*uid) //nolint:errcheck
Expand Down

0 comments on commit c609650

Please sign in to comment.