Skip to content

Commit

Permalink
fix check for background mode
Browse files Browse the repository at this point in the history
  • Loading branch information
JimBugwadia committed Nov 25, 2020
1 parent 3dfe316 commit 4c47d40
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/policy/validate.go
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ func Validate(policyRaw []byte, client *dclient.Client, mock bool, openAPIContro
if path, err := validateUniqueRuleName(p); err != nil {
return fmt.Errorf("path: spec.%s: %v", path, err)
}
if p.Spec.Background == nil || *p.Spec.Background == false {
if p.Spec.Background == nil || *p.Spec.Background == true {
if err := ContainsVariablesOtherThanObject(p); err != nil {
return fmt.Errorf("only select variables are allowed in background mode. Set spec.background=false to disable background mode for this policy rule. %s ", err)
}
Expand Down

0 comments on commit 4c47d40

Please sign in to comment.