I am using the "multiple" option on a field along with the "in" operator.
The rule set is
{
"condition": "AND",
"rules": [
{
"id": "location",
"field": "location",
"type": "string",
"input": "select",
"operator": "in",
"value": [
"Place A",
"Place B",
"Place C"
]
}
],
"valid": true
}
Gives an error which indicates that the "list" of places is not expected, but that would seem to makes to me anyway.
What do you think?
', ' File "/usr/local/lib/python3.8/site-packages/jqqb_evaluator/evaluator.py", line 17, in object_matches_rules
return RuleGroup(self.parsed_rule_set).evaluate(obj)
', ' File "/usr/local/lib/python3.8/site-packages/jqqb_evaluator/rule_group.py", line 11, in evaluate
return all(map(lambda x: RuleGroup.get_rule_object(x).evaluate(obj), self.rules))
', ' File "/usr/local/lib/python3.8/site-packages/jqqb_evaluator/rule_group.py", line 11, in <lambda>
return all(map(lambda x: RuleGroup.get_rule_object(x).evaluate(obj), self.rules))
', ' File "/usr/local/lib/python3.8/site-packages/jqqb_evaluator/rule.py", line 18, in evaluate
return self.get_operator()(self.get_input(obj), self.get_value())
', ' File "/usr/local/lib/python3.8/site-packages/jqqb_evaluator/operators.py", line 44, in eval_in
return right in left
Should the code be
return left in right
?
I am using the "multiple" option on a field along with the "in" operator.
The rule set is
Gives an error which indicates that the "list" of places is not expected, but that would seem to makes to me anyway.
What do you think?
Should the code be
return left in right?