Skip to content

Commit

Permalink
Remove unnecessary check
Browse files Browse the repository at this point in the history
  • Loading branch information
digivava committed Mar 23, 2022
1 parent b1c7f95 commit 9efc7f0
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions vault/logical_system.go
Original file line number Diff line number Diff line change
Expand Up @@ -2445,9 +2445,7 @@ func (b *SystemBackend) handlePoliciesSet(policyType PolicyType) framework.Opera
return logical.ErrorResponse("policy name must be provided in the URL"), nil
}
if name != policy.Name {
if resp == nil {
resp = &logical.Response{}
}
resp = &logical.Response{}
resp.AddWarning(fmt.Sprintf("policy name was converted to %s", policy.Name))
}

Expand Down

0 comments on commit 9efc7f0

Please sign in to comment.