shunyeka / jquery-querybuilder-python-evaluator Goto Github PK
View Code? Open in Web Editor NEWPython Rule evaluator for jQuery-QueryBuilder. It evaluates rules agains provided objects.
License: MIT License
Python Rule evaluator for jQuery-QueryBuilder. It evaluates rules agains provided objects.
License: MIT License
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
?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.