Skip to content

Commit

Permalink
add type check
Browse files Browse the repository at this point in the history
  • Loading branch information
xuzhang3 committed Aug 5, 2024
1 parent 2497463 commit 167d0b1
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion internal/services/authorization/role_management_policy.go
Original file line number Diff line number Diff line change
Expand Up @@ -268,7 +268,9 @@ func buildRoleManagementPolicyForUpdate(metadata *sdk.ResourceMetaData, rolePoli
} else {
if approvalStagesRaw, ok := settings["approvalStages"]; ok {
for _, stage := range approvalStagesRaw.([]interface{}) {
approvalStages = append(approvalStages, stage.(map[string]interface{}))
if v, ok := stage.(map[string]interface{}); ok {
approvalStages = append(approvalStages, v)
}
}
}
}
Expand Down

0 comments on commit 167d0b1

Please sign in to comment.