Skip to content

Commit

Permalink
Deal with nil expression.Value as ""
Browse files Browse the repository at this point in the history
  • Loading branch information
alexsnaps committed Oct 15, 2024
1 parent 6c80002 commit 6147481
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions pkg/evaluators/authorization/kubernetes_authz.go
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,9 @@ func (k *KubernetesAuthz) Call(pipeline auth.AuthPipeline, ctx gocontext.Context

authJSON := pipeline.GetAuthorizationJSON()
jsonValueToStr := func(value expressions.Value) (string, error) {
if value == nil {
return "", nil
}
resolved, err := value.ResolveFor(authJSON)
if err != nil {
return "", err
Expand Down

0 comments on commit 6147481

Please sign in to comment.