fix: parse logic rule error

This commit is contained in:
Skyxim
2022-04-09 22:25:39 +08:00
parent b2981f921c
commit 07906c0aa5
4 changed files with 30 additions and 13 deletions

View File

@@ -19,13 +19,13 @@ func (not *NOT) ShouldFindProcess() bool {
func NewNOT(payload string, adapter string) (*NOT, error) {
not := &NOT{Base: &common.Base{}, payload: payload, adapter: adapter}
rule, err := parseRuleByPayload(payload)
rule, err := parseRuleByPayload(payload, false)
if err != nil {
return nil, err
}
if len(rule) < 1 {
return nil, fmt.Errorf("the parsed rule is empty")
return nil, fmt.Errorf("NOT rule have not a rule")
}
not.rule = rule[0]