Skip to content

Commit

Permalink
Backport of PR #191 into release/0.17.x (#193)
Browse files Browse the repository at this point in the history
  • Loading branch information
vinay-gopalan authored Apr 18, 2024
1 parent 06614fd commit c4e5e21
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion client.go
Original file line number Diff line number Diff line change
Expand Up @@ -218,7 +218,7 @@ func (c *client) unassignRoles(ctx context.Context, roleIDs []string) error {
ctxWithResp := policy.WithCaptureResponse(ctx, &rawResponse)
if _, err := c.provider.DeleteRoleAssignmentByID(ctxWithResp, id); err != nil {
// If a role was deleted manually then Azure returns a error and status 204
if rawResponse.StatusCode == http.StatusNoContent || rawResponse.StatusCode == http.StatusNotFound {
if rawResponse != nil && rawResponse.StatusCode == http.StatusNoContent || rawResponse.StatusCode == http.StatusNotFound {
continue
}

Expand Down

0 comments on commit c4e5e21

Please sign in to comment.