Giter Site home page Giter Site logo

jquery-querybuilder-python-evaluator's People

Contributors

amitchotaliya avatar electis avatar shunyeka avatar wooque avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

jquery-querybuilder-python-evaluator's Issues

"multiple" option on a field along with the "in" operator

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

?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.